progress dialogs
a light weight package to show progress_dialog. as it is a stateful widget, you can change the text shown on the _dialog dynamically.
supported dart versions
dart sdk version >= 2.1.0
demo
how to use
add package
progress_dialog: ^1.1.0+1
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
for normal progress dialog
- initialize the progressdialog object
pr = new progressdialog(context,progressdialogtype.normal);
- if need you can change the default message of progress dialog
pr.setmessage('please wait...');
- showing the progress dialog
pr.show();
- dynamically update the content shown out there
pr.update(message: "few more seconds...");
- dismissing the progress dialog
pr.hide();
for download progress dialog
- initialize the progressdialog object
pr = new progressdialog(context,progressdialogtype.download);
- showing the progress dialog
pr.show();
- if you have been using progress dialog of type download, percentage should be a double
pr.update(progress: percentage,message: "please wait...");
- dismissing the progress dialog
pr.hide();
check if progress dialog is showing
bool isprogressdialogshowing = pr.isshowing();
Comments are closed.