This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:progress_dialog/progress_dialog.dart'; | |
ProgressDialog pr; | |
void main() { | |
runApp(MaterialApp( | |
home: MyApp(), | |
)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:progress_dialog/progress_dialog.dart'; | |
ProgressDialog pr; | |
void main() { | |
runApp(MaterialApp( | |
home: MyApp(), | |
)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
progress_dialog: ^1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:progress_dialog/progress_dialog.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ProgressDialog pr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Default | |
pr = new ProgressDialog(context); | |
//For normal dialog | |
pr = new ProgressDialog(context,type: ProgressDialogType.Normal, isDismissible: true/false, showLogs: true/false); | |
//For showing progress percentage | |
pr = new ProgressDialog(context,type: ProgressDialogType.Download, isDismissible: true/false, showLogs: true/false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pr.style( | |
message: 'Downloading file...', | |
borderRadius: 10.0, | |
backgroundColor: Colors.white, | |
progressWidget: CircularProgressIndicator(), | |
elevation: 10.0, | |
insetAnimCurve: Curves.easeInOut, | |
progress: 0.0, | |
maxProgress: 100.0, | |
progressTextStyle: TextStyle( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pr.update( | |
progress: 50.0, | |
message: "Please wait...", | |
progressWidget: Container( | |
padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()), | |
maxProgress: 100.0, | |
progressTextStyle: TextStyle( | |
color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), | |
messageTextStyle: TextStyle( | |
color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pr.hide().then((isHidden) { | |
print(isHidden); | |
}); |
OlderNewer