├── .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 |
5 |
22 |
33 |
35 |
40 |
42 |
80 |
82 |
241 |
243 |
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 | 15 | 16 |Dart SDK version >= 2.1.0
18 |
Add the Package
23 |dependencies:
24 | progress_dialog: ^1.2.0
25 |
26 | 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 |pr = new ProgressDialog(context);
37 |
38 |
39 | //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 | 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 | pr.show();
68 |
69 |
70 | 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 | pr.hide().then((isHidden) {
90 | print(isHidden);
91 | });
92 |
93 |
94 |
95 | 96 |98 |Navigating to next screens must be done after the completion of Future - hide(). See here for example
97 |
bool isProgressDialogShowing = pr.isShowing();
100 | print(isProgressDialogShowing);
101 |
102 |
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 |Attribute | 112 |Value | 113 |
---|---|
Dismissible | 118 |true | 119 |
ProgressDialogType | 122 |ProgressDialogType.Normal | 123 |
BackgroundColor | 126 |Colors.white | 127 |
BorderRadius | 130 |RoundedRectangularBorder(radius: 8.0) | 131 |
AnimationCurve | 134 |Curves.easeInOut | 135 |
Elevation | 138 |8.0 | 139 |
ProgressWidget | 142 |Double_rings_loding_indicator | 143 |
MessageTextStyle | 146 |color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600 | 147 |
ProgressTextStyle | 150 |color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400 | 151 |
showLogs | 154 |false | 155 |
Attribute | 163 |Can be updated during instantiating | 164 |Can be updated during styling | 165 |Can be updated during dialog is shown | 166 |
---|---|---|---|
Dismissible | 171 |Yes | 172 |No | 173 |No | 174 |
ProgressDialogType | 177 |Yes | 178 |No | 179 |No | 180 |
BackgroundColor | 183 |No | 184 |Yes | 185 |No | 186 |
BorderRadius | 189 |No | 190 |Yes | 191 |No | 192 |
AnimationCurve | 195 |No | 196 |Yes | 197 |No | 198 |
Elevation | 201 |No | 202 |Yes | 203 |No | 204 |
ProgressWidget | 207 |No | 208 |Yes | 209 |Yes | 210 |
MessageTextStyle | 213 |No | 214 |Yes | 215 |Yes | 216 |
ProgressTextStyle | 219 |No | 220 |Yes | 221 |Yes | 222 |
ShowLogs | 225 |Yes | 226 |No | 227 |No | 228 |
Pull requests and issues are always welcome!
233 |Loading indicator -> https://loading.io/
246 |