Skip to content

asundheim/progress_dialog

 
 

Repository files navigation

progress_dialog

A light weight package to show progress dialog

Get the library | Example

How to use

Import the package

import 'package:progress_dialog/progress_dialog.dart';

Create an instance of ProgressDialog

ProgressDialog pr;

Initialise the pr object inside the build() method passing context to it

pr = new ProgressDialog(context);

If need you can change the default message of progress dialog

pr.setMessage('Please wait...');

Showing the progress dialog

pr.show();

Dismissing the progress dialog

pr.hide();

Check if progress dialog is showing

bool isProgressDialogShowing = pr.isShowing();

To use a different loading widget like one from here, use the optional parameter loadingIndicator, otherwise it will use the default CircularProgessIndicator(). You may need to modify the default width allotted to the indicator using the optional parameter loadingIndicatorWidth. To change the style from Cupertino to Material, use the optional parameter progressDialogType which takes an enumeration of ProgressDialogType.Material or ProgressDialogType.CupertinoStyle

ProgressDialog(context, loadingIndicator: Widget, loadingIndicatorWidth: double, progressDialogType: ProgressDialogType)

Demo

ProgressDialog Demo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dart 53.9%
  • Java 24.9%
  • Objective-C 21.2%