├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── encodings.xml ├── libraries │ ├── Dart_Packages.xml │ ├── Dart_SDK.xml │ └── Flutter_Plugins.xml ├── misc.xml ├── modules.xml ├── progress_dialog.iml ├── vcs.xml └── workspace.xml ├── .metadata ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── EXAMPLE.md ├── LICENSE ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── android ├── app │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── flutter │ │ └── plugins │ │ └── GeneratedPluginRegistrant.java └── local.properties ├── assets └── double_ring_loading_io.gif ├── docs ├── example.html └── index.html ├── example ├── .idea │ ├── codeStyles │ │ └── Project.xml │ ├── example.iml │ ├── libraries │ │ ├── Dart_Packages.xml │ │ ├── Dart_SDK.xml │ │ └── Flutter_Plugins.xml │ ├── misc.xml │ ├── modules.xml │ ├── vcs.xml │ └── workspace.xml ├── README.md ├── android │ ├── .gradle │ │ ├── 4.10.2 │ │ │ ├── fileChanges │ │ │ │ └── last-build.bin │ │ │ ├── fileContent │ │ │ │ └── fileContent.lock │ │ │ ├── fileHashes │ │ │ │ ├── fileHashes.bin │ │ │ │ ├── fileHashes.lock │ │ │ │ └── resourceHashesCache.bin │ │ │ ├── gc.properties │ │ │ ├── javaCompile │ │ │ │ ├── classAnalysis.bin │ │ │ │ ├── jarAnalysis.bin │ │ │ │ ├── javaCompile.lock │ │ │ │ └── taskHistory.bin │ │ │ └── taskHistory │ │ │ │ ├── taskHistory.bin │ │ │ │ └── taskHistory.lock │ │ ├── buildOutputCleanup │ │ │ ├── buildOutputCleanup.lock │ │ │ ├── cache.properties │ │ │ └── outputFiles.bin │ │ └── vcs-1 │ │ │ └── gc.properties │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ ├── fayaz │ │ │ │ │ └── progressdialogexample │ │ │ │ │ │ └── MainActivity.java │ │ │ │ └── io │ │ │ │ │ └── flutter │ │ │ │ │ └── plugins │ │ │ │ │ └── GeneratedPluginRegistrant.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── local.properties │ ├── progress_dialog_example_android.iml │ └── settings.gradle ├── ios │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ ├── Generated.xcconfig │ │ ├── Release.xcconfig │ │ └── flutter_export_environment.sh │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── GeneratedPluginRegistrant.h │ │ ├── GeneratedPluginRegistrant.m │ │ ├── Info.plist │ │ └── main.m ├── lib │ ├── issues │ │ └── issue_44.dart │ └── main.dart ├── progress_dialog_example.iml ├── pubspec.lock └── pubspec.yaml ├── lib └── progress_dialog.dart ├── pd_demo_dd.gif ├── pd_demo_nd.gif ├── progress_dialog.iml ├── progress_dialog_1.png ├── progress_dialog_2.png ├── pubspec.lock └── pubspec.yaml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://www.buymeacoffee.com/fayaz", "https://www.paypal.me/fayazf7"] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | ios/.generated/ 9 | ios/Flutter/Generated.xcconfig 10 | ios/Runner/GeneratedPluginRegistrant.* 11 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_Packages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/progress_dialog.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 30 | 31 | 36 | 37 | 38 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 74 | 75 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 1548865170275 91 | 95 | 96 | 1548868693914 97 | 102 | 103 | 1549384236745 104 | 109 | 110 | 1549899508973 111 | 116 | 117 | 1552072646686 118 | 123 | 124 | 1555951972083 125 | 130 | 131 | 1586594506630 132 | 137 | 138 | 1586596153320 139 | 144 | 145 | 1586596549513 146 | 151 | 152 | 1586596631993 153 | 158 | 159 | 1586597000608 160 | 165 | 166 | 1586597066800 167 | 172 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 196 | 197 | 198 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 1.8 238 | 239 | 244 | 245 | 246 | 247 | 248 | 249 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 45b094243760f5bb5377d6c42108798575945deb 8 | channel: master 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.2.4 2 | * Fixed issue RenderBox overflow 3 | * Added rtl and ltr support 4 | 5 | ## 1.2.3 6 | * Fixed issue FlutterError is not a subtype of string 7 | 8 | ## 1.2.2 9 | * Added param for aligning text message 10 | * Added custom body feature 11 | 12 | ## 1.2.1 13 | * Added **await** for showing the dialog 14 | * Added dialog show time delay 15 | ## 1.2.0 16 | 17 | - Added custom styling for widget in runtime, background color, 18 | elevation, border-radius, text-styles, anim-curve, max-progress, 19 | no-drop on backbutton press and fixed old bugs 20 | 21 | ## 1.1.0+1 22 | * Added interactive double ring loading indicator, updated documentation 23 | 24 | ## 1.0.8 25 | * Added interactive double ring loading indicator, updated documentation 26 | 27 | ## 1.0.4 28 | * Bug fixes. 29 | 30 | ## 1.0.3 31 | * Update Dart Version. 32 | 33 | ## 1.0.2 34 | * Added shown/hidden accessibility. 35 | 36 | ## 1.0.1 37 | * Added example and ready for package release. 38 | 39 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at fayazfz07@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ### Want to contribute? 2 | Pull requests and issues are always welcome! 3 | 4 | #### How to contribute? 5 |
    6 |
  1. Fork the repository
  2. 7 |
  3. Clone it to your local machine
  4. 8 |
  5. Open the project in your favourite editor
  6. 9 |
  7. Open cmd/terminal and run flutter clean and then flutter packages get
  8. 10 |
  9. Make the changes
  10. 11 |
  11. Create a Pull Request
  12. 12 |
13 | 14 | #### View the issues [here](https://github.com/fayaz07/progress_dialog/issues) 15 | 16 | #### This library is only tested for Android, iOS contributors are most welcome 17 | 18 | --- 19 | -------------------------------------------------------------------------------- /EXAMPLE.md: -------------------------------------------------------------------------------- 1 | ## Complete Example for Normal Progress Dialog 2 | 3 | ```dart 4 | import 'package:flutter/material.dart'; 5 | import 'package:progress_dialog/progress_dialog.dart'; 6 | 7 | ProgressDialog pr; 8 | 9 | void main() { 10 | runApp(MaterialApp( 11 | home: MyApp(), 12 | )); 13 | } 14 | 15 | class MyApp extends StatelessWidget { 16 | double percentage = 0.0; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | 21 | pr = new ProgressDialog(context,type: ProgressDialogType.Normal); 22 | 23 | pr.style(message: 'Showing some progress...'); 24 | 25 | //Optional 26 | pr.style( 27 | message: 'Please wait...', 28 | borderRadius: 10.0, 29 | backgroundColor: Colors.white, 30 | progressWidget: CircularProgressIndicator(), 31 | elevation: 10.0, 32 | insetAnimCurve: Curves.easeInOut, 33 | progressTextStyle: TextStyle( 34 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 35 | messageTextStyle: TextStyle( 36 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), 37 | ); 38 | 39 | return Scaffold( 40 | body: Center( 41 | child: RaisedButton( 42 | child: Text( 43 | 'Show Dialog', 44 | style: TextStyle(color: Colors.white), 45 | ), 46 | color: Colors.blue, 47 | onPressed: () { 48 | pr.show(); 49 | 50 | Future.delayed(Duration(seconds: 10)).then((onValue){ 51 | print("PR status ${pr.isShowing()}" ); 52 | if(pr.isShowing()) 53 | pr.hide().then((isHidden) { 54 | print(isHidden); 55 | }); 56 | print("PR status ${pr.isShowing()}" ); 57 | }); 58 | 59 | }), 60 | ), 61 | ); 62 | } 63 | } 64 | 65 | ``` 66 | 67 | ## Complete Example for Download Progress Dialog 68 | 69 | ```dart 70 | import 'package:flutter/material.dart'; 71 | import 'package:progress_dialog/progress_dialog.dart'; 72 | 73 | ProgressDialog pr; 74 | 75 | void main() { 76 | runApp(MaterialApp( 77 | home: MyApp(), 78 | )); 79 | } 80 | 81 | class MyApp extends StatelessWidget { 82 | double percentage = 0.0; 83 | 84 | @override 85 | Widget build(BuildContext context) { 86 | 87 | pr = new ProgressDialog(context, type: ProgressDialogType.Download); 88 | pr.style(message: 'Downloading file...'); 89 | 90 | //Optional 91 | pr.style( 92 | message: 'Downloading file...', 93 | borderRadius: 10.0, 94 | backgroundColor: Colors.white, 95 | progressWidget: CircularProgressIndicator(), 96 | elevation: 10.0, 97 | insetAnimCurve: Curves.easeInOut, 98 | progress: 0.0, 99 | maxProgress: 100.0, 100 | progressTextStyle: TextStyle( 101 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 102 | messageTextStyle: TextStyle( 103 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), 104 | ); 105 | 106 | return Scaffold( 107 | body: Center( 108 | child: RaisedButton( 109 | child: Text( 110 | 'Show Dialog', 111 | style: TextStyle(color: Colors.white), 112 | ), 113 | color: Colors.blue, 114 | onPressed: () { 115 | pr.show(); 116 | 117 | Future.delayed(Duration(seconds: 2)).then((onvalue) { 118 | percentage = percentage + 30.0; 119 | print(percentage); 120 | 121 | pr.update( 122 | progress: percentage, 123 | message: "Please wait...", 124 | progressWidget: Container( 125 | padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()), 126 | maxProgress: 100.0, 127 | progressTextStyle: TextStyle( 128 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 129 | messageTextStyle: TextStyle( 130 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), 131 | ); 132 | 133 | Future.delayed(Duration(seconds: 2)).then((value) { 134 | percentage = percentage + 30.0; 135 | pr.update( 136 | progress: percentage, message: "Few more seconds..."); 137 | print(percentage); 138 | Future.delayed(Duration(seconds: 2)).then((value) { 139 | percentage = percentage + 30.0; 140 | pr.update(progress: percentage, message: "Almost done..."); 141 | print(percentage); 142 | 143 | Future.delayed(Duration(seconds: 2)).then((value) { 144 | pr.hide().then((isHidden) { 145 | print(isHidden); 146 | }); 147 | percentage = 0.0; 148 | }); 149 | }); 150 | }); 151 | }); 152 | 153 | }), 154 | ), 155 | ); 156 | } 157 | } 158 | 159 | ``` 160 | 161 | 162 | ## Complete Example for Switching between to Screens 163 | 164 | ```dart 165 | import 'package:flutter/material.dart'; 166 | import 'package:progress_dialog/progress_dialog.dart'; 167 | 168 | ProgressDialog pr; 169 | 170 | void main() { 171 | runApp(MaterialApp( 172 | home: FirstScreen(), 173 | )); 174 | } 175 | 176 | class FirstScreen extends StatefulWidget { 177 | @override 178 | _FirstScreenState createState() => _FirstScreenState(); 179 | } 180 | 181 | class _FirstScreenState extends State { 182 | ProgressDialog pr; 183 | 184 | @override 185 | Widget build(BuildContext context) { 186 | pr = new ProgressDialog(context); 187 | pr.style(message: 'Please wait...'); 188 | 189 | return Scaffold( 190 | body: Center( 191 | child: RaisedButton( 192 | child: Text('Show dialog and go to next screen', 193 | style: TextStyle(color: Colors.white)), 194 | color: Colors.blueAccent, 195 | onPressed: () { 196 | pr.show(); 197 | Future.delayed(Duration(seconds: 3)).then((value) { 198 | pr.hide().whenComplete(() { 199 | Navigator.of(context).push(CupertinoPageRoute( 200 | builder: (BuildContext context) => SecondScreen())); 201 | }); 202 | }); 203 | }, 204 | ), 205 | ), 206 | ); 207 | } 208 | } 209 | 210 | class SecondScreen extends StatefulWidget { 211 | @override 212 | _SecondScreenState createState() => _SecondScreenState(); 213 | } 214 | 215 | class _SecondScreenState extends State { 216 | @override 217 | Widget build(BuildContext context) { 218 | return Scaffold( 219 | body: Center(child: Text('I am second screen')), 220 | ); 221 | } 222 | } 223 | 224 | ``` 225 | 226 | > Please ignore if the above contains any unoptimized code, it's just for an example 227 | 228 | ## Demo 229 | 230 | Normal Progress Download Progress 231 | 232 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### What's this PR do? 2 | Write something here about the PR 3 | 4 | ### Where should the reviewer start? 5 | Mention the files where the reviewer have to review, line numbers or section will be more helpful 6 | 7 | 8 | ### Screenshots (if appropriate) 9 | 10 | 11 | ### Any other suggestions/queries: 12 | Add your queries/suggestions here 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # progress_dialog 2 | 3 | A light weight package to show progress dialog. As it is a stateful widget, you can change the text shown on the dialog dynamically. 4 | 5 | > Thank you for being a user of this package, this package is discontinued due to serveral reasons, please find the other library which you can use to accomplish the task which this package does and I believe that package will be more helpful. Please find the repo link here for [OTS (Over the screen)](https://github.com/fayaz07/ots) 6 | 7 | [![](https://img.shields.io/badge/dontate-Buy%20Me%20a%20Coffee-blueviolet)](https://www.buymeacoffee.com/fayaz)   8 | [![LinkedIn](https://img.shields.io/badge/LinkedIn-in-0e76a8)](https://www.linkedin.com/in/fayaz07)   [![Fork](https://img.shields.io/github/forks/fayaz07/progress_dialog?style=social)](https://github.com/fayaz07/progress_dialog/fork)   [![Star](https://img.shields.io/github/stars/fayaz07/progress_dialog?style=social)](https://github.com/fayaz07/progress_dialog/star)   [![Watches](https://img.shields.io/github/watchers/fayaz07/progress_dialog?style=social)](https://github.com/fayaz07/progress_dialog/) 9 | 10 | [![Get the library](https://img.shields.io/badge/Get%20library-pub-blue)](https://pub.dev/packages/progress_dialog)   [![Example](https://img.shields.io/badge/Example-Ex-success)](https://pub.dev/packages/progress_dialog#-example-tab-) 11 | 12 | 13 | 14 | ## Supported Dart Versions 15 | **Dart SDK version >= 2.7.0** 16 | 17 | 18 | ## Demo 19 | 20 | Normal dialog Demo Download dialog Demo 21 | 22 | 23 | ## Installation 24 | [![Pub](https://img.shields.io/badge/pub-1.2.0-blue)](https://pub.dev/packages/progress_dialog) 25 | 26 | Add the Package 27 | ```yaml 28 | dependencies: 29 | progress_dialog: ^1.2.4 30 | ``` 31 | 32 | ## How to use 33 | 34 | 35 | 36 | Import the package in your dart file 37 | 38 | ```dart 39 | import 'package:progress_dialog/progress_dialog.dart'; 40 | ``` 41 | Create and initialise a **ProgressDialog** object inside the **build()** method passing context to it 42 | 43 |
    44 |
  1. Initialize the ProgressDialog object
    45 | 46 | ```dart 47 | final ProgressDialog pr = ProgressDialog(context); 48 | ``` 49 |
  2. 50 | 51 | 52 |
  3. By default it is a normal dialog to show some message, if you would like to use it to show percentage of progress done, specify the optional type parameter and specify if you want your dialog to dismiss when back button is pressed isDismissible parameter (Optional)
    53 | 54 | ```dart 55 | //For normal dialog 56 | pr = ProgressDialog(context,type: ProgressDialogType.Normal, isDismissible: true/false, showLogs: true/false); 57 | 58 | //For showing progress percentage 59 | pr = ProgressDialog(context,type: ProgressDialogType.Download, isDismissible: true/false, showLogs: true/false); 60 | ``` 61 |
  4. 62 | > Note: Please initialize the ```ProgressDialog```, where you have availability of the context 63 | 64 |
  5. Style the progress dialog (Optional)
    65 | 66 | ```dart 67 | pr.style( 68 | message: 'Downloading file...', 69 | borderRadius: 10.0, 70 | backgroundColor: Colors.white, 71 | progressWidget: CircularProgressIndicator(), 72 | elevation: 10.0, 73 | insetAnimCurve: Curves.easeInOut, 74 | progress: 0.0, 75 | textDirection: TextDirection.rtl, 76 | maxProgress: 100.0, 77 | progressTextStyle: TextStyle( 78 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 79 | messageTextStyle: TextStyle( 80 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600) 81 | ); 82 | ``` 83 | ```note 84 | Note: You don't need to use all parameters, all of them are optional 85 | ``` 86 | 87 |
  6. 88 | 89 |
  7. Showing the progress dialog
    90 | 91 | ```dart 92 | await pr.show(); 93 | ``` 94 |
  8. 95 | 96 |
  9. 97 | Dynamically update the content shown out there
    98 | 99 | ```dart 100 | pr.update( 101 | progress: 50.0, 102 | message: "Please wait...", 103 | progressWidget: Container( 104 | padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()), 105 | maxProgress: 100.0, 106 | progressTextStyle: TextStyle( 107 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 108 | messageTextStyle: TextStyle( 109 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), 110 | ); 111 | ``` 112 | ```note 113 | Note: You don't need to use all parameters, all of them are optional 114 | ``` 115 |
  10. 116 | 117 | 118 |
  11. 119 | Dismissing the progress dialog
    120 | 121 | ```dart 122 | pr.hide().then((isHidden) { 123 | print(isHidden); 124 | }); 125 | 126 | // or 127 | await pr.hide(); 128 | ``` 129 | 130 |
  12. 131 | 132 |
133 | 134 | > Navigating to next screens must be done after the completion of Future - hide(). [See here for example](https://gist.github.com/fayaz07/52dfe04d9f8594501465f169aa6ef6b6) 135 | 136 | ### Check if progress dialog is showing 137 | 138 | ```dart 139 | bool isProgressDialogShowing = pr.isShowing(); 140 | print(isProgressDialogShowing); 141 | ``` 142 | 143 | ### Use custom body 144 | ```dart 145 | pr = ProgressDialog( 146 | context, 147 | type: ProgressDialogType.Normal, 148 | isDismissible: true, 149 | /// your body here 150 | customBody: LinearProgressIndicator( 151 | valueColor: AlwaysStoppedAnimation(Colors.blueAccent), 152 | backgroundColor: Colors.white, 153 | ), 154 | ); 155 | ``` 156 | 157 | 158 | --- 159 | 160 | 161 | ## Demo 162 | 163 | Normal dialog Demo Download dialog Demo 164 | 165 | 166 | ### Default configuration/styles 167 | 168 | If you don't like to configure/style the dialog and continue with the default style, it's okay but just have a look at our default configuration. 169 | 170 | | Attribute | Value | 171 | | ------------- | :-----:| 172 | | Dismissible | true | 173 | | ProgressDialogType | ProgressDialogType.Normal | 174 | | BackgroundColor | Colors.white | 175 | | BorderRadius | RoundedRectangularBorder(radius: 8.0) | 176 | | AnimationCurve | Curves.easeInOut | 177 | | Elevation | 8.0 | 178 | | ProgressWidget | Double_rings_loding_indicator | 179 | | MessageTextStyle | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600 | 180 | | ProgressTextStyle | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400 | 181 | | showLogs | false | 182 | 183 | #### Well let's discuss limits for configuring it 184 | 185 | | Attribute | Can be updated during instantiating | Can be updated during styling |Can be updated during dialog is shown | 186 | | ------------- | :-------------------------------: |:------------------------------: |:-------------------------------: | 187 | | Dismissible | Yes |No |No | 188 | | ProgressDialogType | Yes |No |No | 189 | | BackgroundColor | No |Yes |No | 190 | | BorderRadius | No |Yes |No | 191 | | AnimationCurve | No |Yes |No | 192 | | Elevation | No |Yes |No | 193 | | ProgressWidget | No |Yes |Yes | 194 | | MessageTextStyle | No |Yes |Yes | 195 | | ProgressTextStyle | No |Yes |Yes | 196 | | ShowLogs | Yes |No |No | 197 | 198 | --- 199 | 200 | ### Want to contribute? 201 | Pull requests and issues are always welcome! 202 | 203 | #### How to contribute? 204 |
    205 |
  1. Fork the repository
  2. 206 |
  3. Clone it to your local machine
  4. 207 |
  5. Open the project in your favourite editor
  6. 208 |
  7. Open cmd/terminal and run flutter clean and then flutter packages get
  8. 209 |
  9. Make the changes
  10. 210 |
  11. Create a Pull Request
  12. 211 |
212 | 213 | #### View the issues [here](https://github.com/fayaz07/progress_dialog/issues) 214 | 215 | #### This library is only tested for Android, iOS contributors are most welcome 216 | 217 | --- 218 | Loading indicator -> https://loading.io/ 219 | -------------------------------------------------------------------------------- /android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins; 2 | 3 | import io.flutter.plugin.common.PluginRegistry; 4 | 5 | /** 6 | * Generated file. Do not edit. 7 | */ 8 | public final class GeneratedPluginRegistrant { 9 | public static void registerWith(PluginRegistry registry) { 10 | if (alreadyRegisteredWith(registry)) { 11 | return; 12 | } 13 | } 14 | 15 | private static boolean alreadyRegisteredWith(PluginRegistry registry) { 16 | final String key = GeneratedPluginRegistrant.class.getCanonicalName(); 17 | if (registry.hasPlugin(key)) { 18 | return true; 19 | } 20 | registry.registrarFor(key); 21 | return false; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=/root/Android/Sdk 2 | flutter.sdk=/usr/local/flutter -------------------------------------------------------------------------------- /assets/double_ring_loading_io.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/0ad1eeda2434b947e2834f92b8a9c4962321f592/assets/double_ring_loading_io.gif -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Progress Dialog - Flutter 8 | 9 | 10 | 11 | 12 |

progress_dialog

13 |

A light weight package to show progress dialog. As it is a stateful widget, you can change the text shown on the dialog dynamically.

14 |

Sponsor!   LinkedIn   Follow   Fork   Star   Watches

15 |

Get the library   Example

16 |

Supported Dart Versions

17 |

Dart SDK version >= 2.1.0

18 |

Demo

19 |

Normal dialog Demo Download dialog Demo

20 |

Installation

21 |

Pub

22 |

Add the Package

23 |
dependencies:
 24 |   progress_dialog: ^1.2.0
 25 | 
26 |

How to use

27 |

Import the package in your dart file

28 |
import 'package:progress_dialog/progress_dialog.dart';
 29 | 
30 |

Create an instance of ProgressDialog

31 |
ProgressDialog pr;
 32 | 
33 |

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

34 |
    35 |
  1. Initialize the ProgressDialog object
    36 |
pr = new ProgressDialog(context);
 37 | 
38 | 39 |
  • By default it is a normal dialog to show some message, if you would like to use it to show percentage of progress done, specify the optional type parameter and specify if you want your dialog to dismiss when back button is pressed isDismissible parameter (Optional)
    40 |
  • //For normal dialog
     41 | pr = new ProgressDialog(context,type: ProgressDialogType.Normal, isDismissible: true/false, showLogs: true/false);
     42 |     
     43 | //For showing progress percentage
     44 | pr = new ProgressDialog(context,type: ProgressDialogType.Download, isDismissible: true/false, showLogs: true/false);
     45 | 
    46 | 47 |
  • Style the progress dialog (Optional)
    48 |
  • pr.style(
     49 |   message: 'Downloading file...',
     50 |   borderRadius: 10.0,
     51 |   backgroundColor: Colors.white,
     52 |   progressWidget: CircularProgressIndicator(),
     53 |   elevation: 10.0,
     54 |   insetAnimCurve: Curves.easeInOut,
     55 |   progress: 0.0,
     56 |   maxProgress: 100.0,
     57 |   progressTextStyle: TextStyle(
     58 |      color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400),
     59 |   messageTextStyle: TextStyle(
     60 |      color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600)
     61 |   );
     62 | 
    63 |
    Note: You don't need to use all parameters, all of them are optional
     64 | 
    65 | 66 |
  • Showing the progress dialog
    67 |
  • pr.show();
     68 | 
    69 | 70 |
  • 71 | Dynamically update the content shown out there
    72 |
  • pr.update(
     73 |   progress: 50.0,
     74 |   message: "Please wait...",
     75 |   progressWidget: Container(
     76 |     padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()),
     77 |   maxProgress: 100.0,
     78 |   progressTextStyle: TextStyle(
     79 |     color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400),
     80 |   messageTextStyle: TextStyle(
     81 |     color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600),
     82 |   );
     83 | 
    84 |
    Note: You don't need to use all parameters, all of them are optional
     85 | 
    86 | 87 |
  • 88 | Dismissing the progress dialog
    89 |
  • pr.hide().then((isHidden) {
     90 |   print(isHidden);
     91 | });
     92 | 
    93 | 94 | 95 |
    96 |

    Navigating to next screens must be done after the completion of Future - hide(). See here for example

    97 |
    98 |

    Check if progress dialog is showing

    99 |
    bool isProgressDialogShowing = pr.isShowing();
    100 | print(isProgressDialogShowing);
    101 | 
    102 |
    103 |

    Demo

    104 |

    Normal dialog Demo Download dialog Demo

    105 |

    Default configuration/styles

    106 |

    If you don’t like to configure/style the dialog and continue with the default style, it’s okay but just have a look at our default configuration.

    107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 |
    AttributeValue
    Dismissibletrue
    ProgressDialogTypeProgressDialogType.Normal
    BackgroundColorColors.white
    BorderRadiusRoundedRectangularBorder(radius: 8.0)
    AnimationCurveCurves.easeInOut
    Elevation8.0
    ProgressWidgetDouble_rings_loding_indicator
    MessageTextStylecolor: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600
    ProgressTextStylecolor: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400
    showLogsfalse

    Well let’s discuss limits for configuring it

    158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 |
    AttributeCan be updated during instantiatingCan be updated during stylingCan be updated during dialog is shown
    DismissibleYesNoNo
    ProgressDialogTypeYesNoNo
    BackgroundColorNoYesNo
    BorderRadiusNoYesNo
    AnimationCurveNoYesNo
    ElevationNoYesNo
    ProgressWidgetNoYesYes
    MessageTextStyleNoYesYes
    ProgressTextStyleNoYesYes
    ShowLogsYesNoNo

    231 |

    Want to contribute?

    232 |

    Pull requests and issues are always welcome!

    233 |

    How to contribute?

    234 |
      235 |
    1. Fork the repository
    2. 236 |
    3. Clone it to your local machine
    4. 237 |
    5. Open the project in your favourite editor
    6. 238 |
    7. Open cmd/terminal and run flutter clean and then flutter packages get
    8. 239 |
    9. Make the changes
    10. 240 |
    11. Create a Pull Request
    12. 241 |
    242 |

    View the issues here

    243 |

    This library is only tested for Android, iOS contributors are most welcome

    244 |
    245 |

    Loading indicator -> https://loading.io/

    246 |
    247 | 248 | 249 | 250 | -------------------------------------------------------------------------------- /example/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/.idea/example.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example/.idea/libraries/Dart_Packages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /example/.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 83 | 84 | 85 | 87 | 88 | 95 | 96 | 97 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 |