├── example ├── android │ ├── .gradle │ │ ├── vcs-1 │ │ │ └── gc.properties │ │ ├── 4.10.2 │ │ │ ├── gc.properties │ │ │ ├── fileChanges │ │ │ │ └── last-build.bin │ │ │ ├── fileHashes │ │ │ │ ├── fileHashes.bin │ │ │ │ ├── fileHashes.lock │ │ │ │ └── resourceHashesCache.bin │ │ │ ├── fileContent │ │ │ │ └── fileContent.lock │ │ │ ├── javaCompile │ │ │ │ ├── jarAnalysis.bin │ │ │ │ ├── javaCompile.lock │ │ │ │ ├── taskHistory.bin │ │ │ │ └── classAnalysis.bin │ │ │ └── taskHistory │ │ │ │ ├── taskHistory.bin │ │ │ │ └── taskHistory.lock │ │ └── buildOutputCleanup │ │ │ ├── cache.properties │ │ │ ├── outputFiles.bin │ │ │ └── buildOutputCleanup.lock │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── local.properties │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── 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 │ │ │ │ │ └── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── java │ │ │ │ │ ├── fayaz │ │ │ │ │ │ └── progressdialogexample │ │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── io │ │ │ │ │ │ └── flutter │ │ │ │ │ │ └── plugins │ │ │ │ │ │ └── GeneratedPluginRegistrant.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── settings.gradle │ ├── build.gradle │ ├── progress_dialog_example_android.iml │ ├── gradlew.bat │ └── gradlew ├── ios │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Generated.xcconfig │ │ ├── flutter_export_environment.sh │ │ └── AppFrameworkInfo.plist │ ├── Runner │ │ ├── AppDelegate.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── 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-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── main.m │ │ ├── GeneratedPluginRegistrant.m │ │ ├── GeneratedPluginRegistrant.h │ │ ├── AppDelegate.m │ │ ├── Info.plist │ │ └── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ └── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── .idea │ ├── vcs.xml │ ├── libraries │ │ ├── Flutter_Plugins.xml │ │ ├── Dart_SDK.xml │ │ └── Dart_Packages.xml │ ├── misc.xml │ ├── modules.xml │ ├── example.iml │ ├── codeStyles │ │ └── Project.xml │ └── workspace.xml ├── pubspec.yaml ├── progress_dialog_example.iml ├── lib │ ├── issues │ │ └── issue_44.dart │ └── main.dart ├── pubspec.lock └── README.md ├── android ├── local.properties └── app │ └── src │ └── main │ └── java │ └── io │ └── flutter │ └── plugins │ └── GeneratedPluginRegistrant.java ├── pd_demo_dd.gif ├── pd_demo_nd.gif ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md ├── progress_dialog_1.png ├── progress_dialog_2.png ├── assets └── double_ring_loading_io.gif ├── .idea ├── encodings.xml ├── vcs.xml ├── libraries │ ├── Flutter_Plugins.xml │ ├── Dart_SDK.xml │ └── Dart_Packages.xml ├── modules.xml ├── misc.xml ├── progress_dialog.iml ├── codeStyles │ └── Project.xml └── workspace.xml ├── .gitignore ├── .metadata ├── PULL_REQUEST_TEMPLATE.md ├── pubspec.yaml ├── CONTRIBUTING.md ├── CHANGELOG.md ├── progress_dialog.iml ├── CODE_OF_CONDUCT.md ├── pubspec.lock ├── EXAMPLE.md ├── lib └── progress_dialog.dart ├── README.md ├── LICENSE └── docs └── index.html /example/android/.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /android/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=/root/Android/Sdk 2 | flutter.sdk=/usr/local/flutter -------------------------------------------------------------------------------- /pd_demo_dd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/pd_demo_dd.gif -------------------------------------------------------------------------------- /pd_demo_nd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/pd_demo_nd.gif -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://www.buymeacoffee.com/fayaz", "https://www.paypal.me/fayazf7"] 2 | -------------------------------------------------------------------------------- /progress_dialog_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/progress_dialog_1.png -------------------------------------------------------------------------------- /progress_dialog_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/progress_dialog_2.png -------------------------------------------------------------------------------- /example/android/.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Wed Jan 30 22:24:29 IST 2019 2 | gradle.version=4.10.2 3 | -------------------------------------------------------------------------------- /assets/double_ring_loading_io.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/assets/double_ring_loading_io.gif -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=/home/fayaz/Android/Sdk 2 | flutter.sdk=/usr/local/flutter 3 | flutter.buildMode=debug 4 | flutter.versionName=1.0.0 -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/fileContent/fileContent.lock -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/javaCompile/jarAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/javaCompile/jarAnalysis.bin -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/javaCompile/javaCompile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/javaCompile/javaCompile.lock -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/javaCompile/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/javaCompile/taskHistory.bin -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/taskHistory/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/taskHistory/taskHistory.bin -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/taskHistory/taskHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/taskHistory/taskHistory.lock -------------------------------------------------------------------------------- /example/android/.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/javaCompile/classAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/javaCompile/classAnalysis.bin -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/.gradle/4.10.2/fileHashes/resourceHashesCache.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/4.10.2/fileHashes/resourceHashesCache.bin -------------------------------------------------------------------------------- /example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.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/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayaz07/progress_dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/ios/Runner/GeneratedPluginRegistrant.m: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #import "GeneratedPluginRegistrant.h" 6 | 7 | @implementation GeneratedPluginRegistrant 8 | 9 | + (void)registerWithRegistry:(NSObject*)registry { 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /example/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: progress_dialog_example 2 | description: A new Flutter application. 3 | 4 | version: 1.0.0 5 | 6 | environment: 7 | sdk: ">=2.7.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | cupertino_icons: ^0.1.2 14 | progress_dialog: 15 | path: ../ 16 | 17 | dev_dependencies: 18 | flutter_test: 19 | sdk: flutter 20 | 21 | flutter: 22 | 23 | uses-material-design: true 24 | 25 | -------------------------------------------------------------------------------- /example/ios/Runner/GeneratedPluginRegistrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GeneratedPluginRegistrant_h 6 | #define GeneratedPluginRegistrant_h 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface GeneratedPluginRegistrant : NSObject 13 | + (void)registerWithRegistry:(NSObject*)registry; 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | #endif /* GeneratedPluginRegistrant_h */ 18 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/fayaz/progressdialogexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package fayaz.progressdialogexample; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /example/ios/Flutter/Generated.xcconfig: -------------------------------------------------------------------------------- 1 | // This is a generated file; do not edit or check into version control. 2 | FLUTTER_ROOT=/usr/local/flutter 3 | FLUTTER_APPLICATION_PATH=/home/fayaz/StudioProjects/progress_dialog/example 4 | FLUTTER_TARGET=lib/main.dart 5 | FLUTTER_BUILD_DIR=build 6 | SYMROOT=${SOURCE_ROOT}/../build/ios 7 | OTHER_LDFLAGS=$(inherited) -framework Flutter 8 | FLUTTER_FRAMEWORK_DIR=/usr/local/flutter/bin/cache/artifacts/engine/ios 9 | FLUTTER_BUILD_NAME=1.0.0 10 | FLUTTER_BUILD_NUMBER=1.0.0 11 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: progress_dialog 2 | description: A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it. 3 | version: 1.2.4 4 | #author: Fayaz 5 | homepage: https://github.com/fayaz07/progress_dialog 6 | 7 | environment: 8 | sdk: ">=2.7.0 <3.0.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | 18 | flutter: 19 | assets: 20 | - assets/double_ring_loading_io.gif 21 | 22 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/usr/local/flutter" 4 | export "FLUTTER_APPLICATION_PATH=/home/fayaz/StudioProjects/progress_dialog/example" 5 | export "FLUTTER_TARGET=lib/main.dart" 6 | export "FLUTTER_BUILD_DIR=build" 7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios" 8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter" 9 | export "FLUTTER_FRAMEWORK_DIR=/usr/local/flutter/bin/cache/artifacts/engine/ios" 10 | export "FLUTTER_BUILD_NAME=1.0.0" 11 | export "FLUTTER_BUILD_NUMBER=1.0.0" 12 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/.idea/example.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example/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 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/progress_dialog_example.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /progress_dialog.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /example/android/progress_dialog_example_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /.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/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/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | progress_dialog_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 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/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /example/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "fayaz.progressdialogexample" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /example/lib/issues/issue_44.dart: -------------------------------------------------------------------------------- 1 | //import 'package:flutter/cupertino.dart'; 2 | //import 'package:flutter/material.dart'; 3 | //import 'package:progress_dialog/progress_dialog.dart'; 4 | // 5 | //void main() => runApp(MaterialApp(home: IndexPage())); 6 | // 7 | //class IndexPage extends StatefulWidget { 8 | // IndexPage({Key key}) : super(key: key); 9 | // 10 | // @override 11 | // _IndexPageState createState() => _IndexPageState(); 12 | //} 13 | // 14 | //// AutomaticKeepAliveClientMixin, see https://blog.csdn.net/a875801/article/details/92829950 15 | //// TickerProviderStateMixin, see https://blog.csdn.net/u011272795/article/details/82740389 16 | //class _IndexPageState extends State 17 | // with AutomaticKeepAliveClientMixin, TickerProviderStateMixin { 18 | //// List recommendCourses = []; 19 | //// List freeCourses = []; 20 | //// List recommendNews = []; 21 | // ProgressDialog pr; 22 | // TabController _tabController; 23 | // 24 | // @override 25 | // bool get wantKeepAlive => true; 26 | // 27 | // @override 28 | // void initState() { 29 | // print('Index, initState'); 30 | // 31 | // // pr = new ProgressDialog(context, showLogs: true); 32 | //// _tabController = TabController(length: categories.length, vsync: this); 33 | // _tabController = TabController(length: 3, vsync: this); 34 | // _updateState(); 35 | // super.initState(); 36 | // } 37 | // 38 | // @override 39 | // void dispose() { 40 | // print('Index, dispose'); 41 | // _tabController.dispose(); 42 | // super.dispose(); 43 | // } 44 | // 45 | // void _updateState() async { 46 | // pr.show(); 47 | // print('pr.show()'); 48 | // var _recommendCourses = await CommonService().getRecommendCourses(3); 49 | // var _freeCourses = await CommonService().getfreeCourses(2); 50 | // var _recommendNews = await CommonService().getRecommendNews(3); 51 | // print('_updateState: ${_recommendCourses}'); 52 | // setState(() { 53 | // print('setState: ${_recommendCourses}'); 54 | // recommendCourses = _recommendCourses; 55 | // freeCourses = _freeCourses; 56 | // recommendNews = _recommendNews; 57 | // pr.hide(); 58 | // print('pr.hide()'); 59 | // }); 60 | // } 61 | ////... 62 | //} 63 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /.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 |
-------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.13" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.6.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.1" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.0.0" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.3" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.12" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.4" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_test: 66 | dependency: "direct dev" 67 | description: flutter 68 | source: sdk 69 | version: "0.0.0" 70 | image: 71 | dependency: transitive 72 | description: 73 | name: image 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "2.1.12" 77 | matcher: 78 | dependency: transitive 79 | description: 80 | name: matcher 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "0.12.6" 84 | meta: 85 | dependency: transitive 86 | description: 87 | name: meta 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.1.8" 91 | path: 92 | dependency: transitive 93 | description: 94 | name: path 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.6.4" 98 | petitparser: 99 | dependency: transitive 100 | description: 101 | name: petitparser 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "2.4.0" 105 | quiver: 106 | dependency: transitive 107 | description: 108 | name: quiver 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "2.1.3" 112 | sky_engine: 113 | dependency: transitive 114 | description: flutter 115 | source: sdk 116 | version: "0.0.99" 117 | source_span: 118 | dependency: transitive 119 | description: 120 | name: source_span 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.7.0" 124 | stack_trace: 125 | dependency: transitive 126 | description: 127 | name: stack_trace 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.9.3" 131 | stream_channel: 132 | dependency: transitive 133 | description: 134 | name: stream_channel 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "2.0.0" 138 | string_scanner: 139 | dependency: transitive 140 | description: 141 | name: string_scanner 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.0.5" 145 | term_glyph: 146 | dependency: transitive 147 | description: 148 | name: term_glyph 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.1.0" 152 | test_api: 153 | dependency: transitive 154 | description: 155 | name: test_api 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.2.15" 159 | typed_data: 160 | dependency: transitive 161 | description: 162 | name: typed_data 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.1.6" 166 | vector_math: 167 | dependency: transitive 168 | description: 169 | name: vector_math 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "2.0.8" 173 | xml: 174 | dependency: transitive 175 | description: 176 | name: xml 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "3.6.1" 180 | sdks: 181 | dart: ">=2.6.0 <3.0.0" 182 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.13" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.6.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.1" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.0.0" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.3" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.12" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.4" 60 | cupertino_icons: 61 | dependency: "direct main" 62 | description: 63 | name: cupertino_icons 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.1.2" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | image: 78 | dependency: transitive 79 | description: 80 | name: image 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "2.1.12" 84 | matcher: 85 | dependency: transitive 86 | description: 87 | name: matcher 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "0.12.6" 91 | meta: 92 | dependency: transitive 93 | description: 94 | name: meta 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.1.8" 98 | path: 99 | dependency: transitive 100 | description: 101 | name: path 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "1.6.4" 105 | petitparser: 106 | dependency: transitive 107 | description: 108 | name: petitparser 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "2.4.0" 112 | progress_dialog: 113 | dependency: "direct main" 114 | description: 115 | path: ".." 116 | relative: true 117 | source: path 118 | version: "1.2.3" 119 | quiver: 120 | dependency: transitive 121 | description: 122 | name: quiver 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "2.1.3" 126 | sky_engine: 127 | dependency: transitive 128 | description: flutter 129 | source: sdk 130 | version: "0.0.99" 131 | source_span: 132 | dependency: transitive 133 | description: 134 | name: source_span 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.7.0" 138 | stack_trace: 139 | dependency: transitive 140 | description: 141 | name: stack_trace 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.9.3" 145 | stream_channel: 146 | dependency: transitive 147 | description: 148 | name: stream_channel 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.0.0" 152 | string_scanner: 153 | dependency: transitive 154 | description: 155 | name: string_scanner 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.0.5" 159 | term_glyph: 160 | dependency: transitive 161 | description: 162 | name: term_glyph 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.1.0" 166 | test_api: 167 | dependency: transitive 168 | description: 169 | name: test_api 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.2.15" 173 | typed_data: 174 | dependency: transitive 175 | description: 176 | name: typed_data 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.6" 180 | vector_math: 181 | dependency: transitive 182 | description: 183 | name: vector_math 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.0.8" 187 | xml: 188 | dependency: transitive 189 | description: 190 | name: xml 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "3.6.1" 194 | sdks: 195 | dart: ">=2.7.0 <3.0.0" 196 | -------------------------------------------------------------------------------- /example/README.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(); 54 | print("PR status ${pr.isShowing()}" ); 55 | }); 56 | 57 | }), 58 | ), 59 | ); 60 | } 61 | } 62 | 63 | ``` 64 | 65 | ## Complete Example for Download Progress Dialog 66 | 67 | ```dart 68 | import 'package:flutter/material.dart'; 69 | import 'package:progress_dialog/progress_dialog.dart'; 70 | 71 | ProgressDialog pr; 72 | 73 | void main() { 74 | runApp(MaterialApp( 75 | home: MyApp(), 76 | )); 77 | } 78 | 79 | class MyApp extends StatelessWidget { 80 | double percentage = 0.0; 81 | 82 | @override 83 | Widget build(BuildContext context) { 84 | 85 | pr = new ProgressDialog(context, type: ProgressDialogType.Download); 86 | pr.style(message: 'Downloading file...'); 87 | 88 | //Optional 89 | pr.style( 90 | message: 'Downloading file...', 91 | borderRadius: 10.0, 92 | backgroundColor: Colors.white, 93 | progressWidget: CircularProgressIndicator(), 94 | elevation: 10.0, 95 | insetAnimCurve: Curves.easeInOut, 96 | progress: 0.0, 97 | maxProgress: 100.0, 98 | progressTextStyle: TextStyle( 99 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 100 | messageTextStyle: TextStyle( 101 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), 102 | ); 103 | 104 | return Scaffold( 105 | body: Center( 106 | child: RaisedButton( 107 | child: Text( 108 | 'Show Dialog', 109 | style: TextStyle(color: Colors.white), 110 | ), 111 | color: Colors.blue, 112 | onPressed: () { 113 | pr.show(); 114 | 115 | Future.delayed(Duration(seconds: 2)).then((onvalue) { 116 | percentage = percentage + 30.0; 117 | print(percentage); 118 | 119 | pr.update( 120 | progress: percentage, 121 | message: "Please wait...", 122 | progressWidget: Container( 123 | padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()), 124 | maxProgress: 100.0, 125 | progressTextStyle: TextStyle( 126 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 127 | messageTextStyle: TextStyle( 128 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), 129 | ); 130 | 131 | Future.delayed(Duration(seconds: 2)).then((value) { 132 | percentage = percentage + 30.0; 133 | pr.update( 134 | progress: percentage, message: "Few more seconds..."); 135 | print(percentage); 136 | Future.delayed(Duration(seconds: 2)).then((value) { 137 | percentage = percentage + 30.0; 138 | pr.update(progress: percentage, message: "Almost done..."); 139 | print(percentage); 140 | 141 | Future.delayed(Duration(seconds: 2)).then((value) { 142 | pr.hide(); 143 | percentage = 0.0; 144 | }); 145 | }); 146 | }); 147 | }); 148 | 149 | }), 150 | ), 151 | ); 152 | } 153 | } 154 | 155 | ``` 156 | 157 | > Please ignore if the above contains any unoptimized code, it's just for an example 158 | 159 | ## Demo 160 | 161 | Normal Progress Download Progress 162 | 163 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:progress_dialog/progress_dialog.dart'; 4 | 5 | //import '../../lib/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 | // pr = new ProgressDialog(context, 21 | // type: ProgressDialogType.Normal, isDismissible: false); 22 | // pr = new ProgressDialog(context, type: ProgressDialogType.Download); 23 | 24 | // Custom body test 25 | pr = ProgressDialog( 26 | context, 27 | type: ProgressDialogType.Download, 28 | textDirection: TextDirection.rtl, 29 | isDismissible: true, 30 | // customBody: LinearProgressIndicator( 31 | // valueColor: AlwaysStoppedAnimation(Colors.blueAccent), 32 | // backgroundColor: Colors.white, 33 | // ), 34 | ); 35 | 36 | pr.style( 37 | // message: 'Downloading file...', 38 | message: 39 | 'Lets dump some huge text into the progress dialog and check whether it can handle the huge text. If it works then not you or me, flutter is awesome', 40 | borderRadius: 10.0, 41 | backgroundColor: Colors.white, 42 | elevation: 10.0, 43 | insetAnimCurve: Curves.easeInOut, 44 | progress: 0.0, 45 | progressWidgetAlignment: Alignment.center, 46 | maxProgress: 100.0, 47 | progressTextStyle: TextStyle( 48 | color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), 49 | messageTextStyle: TextStyle( 50 | color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600), 51 | ); 52 | 53 | return Scaffold( 54 | body: Center( 55 | child: RaisedButton( 56 | child: Text( 57 | 'Show Dialog', 58 | style: TextStyle(color: Colors.white), 59 | ), 60 | color: Colors.blue, 61 | onPressed: () async { 62 | await pr.show(); 63 | 64 | Future.delayed(Duration(seconds: 2)).then((onvalue) { 65 | percentage = percentage + 30.0; 66 | print(percentage); 67 | 68 | pr.update( 69 | progress: percentage, 70 | message: "Please wait...", 71 | progressWidget: Container( 72 | padding: EdgeInsets.all(8.0), 73 | child: CircularProgressIndicator()), 74 | maxProgress: 100.0, 75 | progressTextStyle: TextStyle( 76 | color: Colors.black, 77 | fontSize: 13.0, 78 | fontWeight: FontWeight.w400), 79 | messageTextStyle: TextStyle( 80 | color: Colors.black, 81 | fontSize: 19.0, 82 | fontWeight: FontWeight.w600), 83 | ); 84 | 85 | Future.delayed(Duration(seconds: 2)).then((value) { 86 | percentage = percentage + 30.0; 87 | pr.update( 88 | progress: percentage, message: "Few more seconds..."); 89 | print(percentage); 90 | Future.delayed(Duration(seconds: 2)).then((value) { 91 | percentage = percentage + 30.0; 92 | pr.update(progress: percentage, message: "Almost done..."); 93 | print(percentage); 94 | 95 | Future.delayed(Duration(seconds: 2)).then((value) { 96 | pr.hide().whenComplete(() { 97 | print(pr.isShowing()); 98 | }); 99 | percentage = 0.0; 100 | }); 101 | }); 102 | }); 103 | }); 104 | 105 | Future.delayed(Duration(seconds: 10)).then((onValue) { 106 | print("PR status ${pr.isShowing()}"); 107 | if (pr.isShowing()) 108 | pr.hide().then((isHidden) { 109 | print(isHidden); 110 | }); 111 | print("PR status ${pr.isShowing()}"); 112 | }); 113 | }), 114 | ), 115 | ); 116 | } 117 | } 118 | 119 | class FirstScreen extends StatefulWidget { 120 | @override 121 | _FirstScreenState createState() => _FirstScreenState(); 122 | } 123 | 124 | class _FirstScreenState extends State { 125 | ProgressDialog pr; 126 | 127 | @override 128 | Widget build(BuildContext context) { 129 | pr = new ProgressDialog(context, showLogs: true); 130 | pr.style(message: 'Please wait...'); 131 | 132 | return Scaffold( 133 | body: Center( 134 | child: RaisedButton( 135 | child: Text('Show dialog and go to next screen', 136 | style: TextStyle(color: Colors.white)), 137 | color: Colors.blueAccent, 138 | onPressed: () { 139 | pr.show(); 140 | Future.delayed(Duration(seconds: 3)).then((value) { 141 | pr.hide().whenComplete(() { 142 | Navigator.of(context).push(CupertinoPageRoute( 143 | builder: (BuildContext context) => SecondScreen())); 144 | }); 145 | }); 146 | }, 147 | ), 148 | ), 149 | ); 150 | } 151 | } 152 | 153 | class SecondScreen extends StatefulWidget { 154 | @override 155 | _SecondScreenState createState() => _SecondScreenState(); 156 | } 157 | 158 | class _SecondScreenState extends State { 159 | @override 160 | Widget build(BuildContext context) { 161 | return Scaffold( 162 | body: Center(child: Text('I am second screen')), 163 | ); 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/progress_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/painting.dart'; 4 | 5 | enum ProgressDialogType { Normal, Download } 6 | 7 | String _dialogMessage = "Loading..."; 8 | double _progress = 0.0, _maxProgress = 100.0; 9 | 10 | Widget _customBody; 11 | 12 | TextAlign _textAlign = TextAlign.left; 13 | Alignment _progressWidgetAlignment = Alignment.centerLeft; 14 | 15 | TextDirection _direction = TextDirection.ltr; 16 | 17 | bool _isShowing = false; 18 | BuildContext _context, _dismissingContext; 19 | ProgressDialogType _progressDialogType; 20 | bool _barrierDismissible = true, _showLogs = false; 21 | 22 | TextStyle _progressTextStyle = TextStyle( 23 | color: Colors.black, fontSize: 12.0, fontWeight: FontWeight.w400), 24 | _messageStyle = TextStyle( 25 | color: Colors.black, fontSize: 18.0, fontWeight: FontWeight.w600); 26 | 27 | double _dialogElevation = 8.0, _borderRadius = 8.0; 28 | Color _backgroundColor = Colors.white; 29 | Curve _insetAnimCurve = Curves.easeInOut; 30 | EdgeInsets _dialogPadding = const EdgeInsets.all(8.0); 31 | 32 | Widget _progressWidget = Image.asset( 33 | 'assets/double_ring_loading_io.gif', 34 | package: 'progress_dialog', 35 | ); 36 | 37 | class ProgressDialog { 38 | _Body _dialog; 39 | 40 | ProgressDialog(BuildContext context, 41 | {ProgressDialogType type, 42 | bool isDismissible, 43 | bool showLogs, 44 | TextDirection textDirection, 45 | Widget customBody}) { 46 | _context = context; 47 | _progressDialogType = type ?? ProgressDialogType.Normal; 48 | _barrierDismissible = isDismissible ?? true; 49 | _showLogs = showLogs ?? false; 50 | _customBody = customBody ?? null; 51 | _direction = textDirection ?? TextDirection.ltr; 52 | } 53 | 54 | void style( 55 | {Widget child, 56 | double progress, 57 | double maxProgress, 58 | String message, 59 | Widget progressWidget, 60 | Color backgroundColor, 61 | TextStyle progressTextStyle, 62 | TextStyle messageTextStyle, 63 | double elevation, 64 | TextAlign textAlign, 65 | double borderRadius, 66 | Curve insetAnimCurve, 67 | EdgeInsets padding, 68 | Alignment progressWidgetAlignment}) { 69 | if (_isShowing) return; 70 | if (_progressDialogType == ProgressDialogType.Download) { 71 | _progress = progress ?? _progress; 72 | } 73 | 74 | _dialogMessage = message ?? _dialogMessage; 75 | _maxProgress = maxProgress ?? _maxProgress; 76 | _progressWidget = progressWidget ?? _progressWidget; 77 | _backgroundColor = backgroundColor ?? _backgroundColor; 78 | _messageStyle = messageTextStyle ?? _messageStyle; 79 | _progressTextStyle = progressTextStyle ?? _progressTextStyle; 80 | _dialogElevation = elevation ?? _dialogElevation; 81 | _borderRadius = borderRadius ?? _borderRadius; 82 | _insetAnimCurve = insetAnimCurve ?? _insetAnimCurve; 83 | _textAlign = textAlign ?? _textAlign; 84 | _progressWidget = child ?? _progressWidget; 85 | _dialogPadding = padding ?? _dialogPadding; 86 | _progressWidgetAlignment = 87 | progressWidgetAlignment ?? _progressWidgetAlignment; 88 | } 89 | 90 | void update( 91 | {double progress, 92 | double maxProgress, 93 | String message, 94 | Widget progressWidget, 95 | TextStyle progressTextStyle, 96 | TextStyle messageTextStyle}) { 97 | if (_progressDialogType == ProgressDialogType.Download) { 98 | _progress = progress ?? _progress; 99 | } 100 | 101 | _dialogMessage = message ?? _dialogMessage; 102 | _maxProgress = maxProgress ?? _maxProgress; 103 | _progressWidget = progressWidget ?? _progressWidget; 104 | _messageStyle = messageTextStyle ?? _messageStyle; 105 | _progressTextStyle = progressTextStyle ?? _progressTextStyle; 106 | 107 | if (_isShowing) _dialog.update(); 108 | } 109 | 110 | bool isShowing() { 111 | return _isShowing; 112 | } 113 | 114 | Future hide() async { 115 | try { 116 | if (_isShowing) { 117 | _isShowing = false; 118 | Navigator.of(_dismissingContext).pop(); 119 | if (_showLogs) debugPrint('ProgressDialog dismissed'); 120 | return Future.value(true); 121 | } else { 122 | if (_showLogs) debugPrint('ProgressDialog already dismissed'); 123 | return Future.value(false); 124 | } 125 | } catch (err) { 126 | debugPrint('Seems there is an issue hiding dialog'); 127 | debugPrint(err.toString()); 128 | return Future.value(false); 129 | } 130 | } 131 | 132 | Future show() async { 133 | try { 134 | if (!_isShowing) { 135 | _dialog = new _Body(); 136 | showDialog( 137 | context: _context, 138 | barrierDismissible: _barrierDismissible, 139 | builder: (BuildContext context) { 140 | _dismissingContext = context; 141 | return WillPopScope( 142 | onWillPop: () async => _barrierDismissible, 143 | child: Dialog( 144 | backgroundColor: _backgroundColor, 145 | insetAnimationCurve: _insetAnimCurve, 146 | insetAnimationDuration: Duration(milliseconds: 100), 147 | elevation: _dialogElevation, 148 | shape: RoundedRectangleBorder( 149 | borderRadius: 150 | BorderRadius.all(Radius.circular(_borderRadius))), 151 | child: _dialog), 152 | ); 153 | }, 154 | ); 155 | // Delaying the function for 200 milliseconds 156 | // [Default transitionDuration of DialogRoute] 157 | await Future.delayed(Duration(milliseconds: 200)); 158 | if (_showLogs) debugPrint('ProgressDialog shown'); 159 | _isShowing = true; 160 | return true; 161 | } else { 162 | if (_showLogs) debugPrint("ProgressDialog already shown/showing"); 163 | return false; 164 | } 165 | } catch (err) { 166 | _isShowing = false; 167 | debugPrint('Exception while showing the dialog'); 168 | debugPrint(err.toString()); 169 | return false; 170 | } 171 | } 172 | } 173 | 174 | // ignore: must_be_immutable 175 | class _Body extends StatefulWidget { 176 | _BodyState _dialog = _BodyState(); 177 | 178 | update() { 179 | _dialog.update(); 180 | } 181 | 182 | @override 183 | State createState() { 184 | return _dialog; 185 | } 186 | } 187 | 188 | class _BodyState extends State<_Body> { 189 | update() { 190 | setState(() {}); 191 | } 192 | 193 | @override 194 | void dispose() { 195 | _isShowing = false; 196 | if (_showLogs) debugPrint('ProgressDialog dismissed by back button'); 197 | super.dispose(); 198 | } 199 | 200 | @override 201 | Widget build(BuildContext context) { 202 | final loader = Align( 203 | alignment: _progressWidgetAlignment, 204 | child: SizedBox( 205 | width: 60.0, 206 | height: 60.0, 207 | child: _progressWidget, 208 | ), 209 | ); 210 | 211 | final text = Expanded( 212 | child: _progressDialogType == ProgressDialogType.Normal 213 | ? Text( 214 | _dialogMessage, 215 | textAlign: _textAlign, 216 | style: _messageStyle, 217 | textDirection: _direction, 218 | ) 219 | : Padding( 220 | padding: const EdgeInsets.all(8.0), 221 | child: Column( 222 | mainAxisSize: MainAxisSize.min, 223 | children: [ 224 | SizedBox(height: 8.0), 225 | Row( 226 | children: [ 227 | Expanded( 228 | child: Text( 229 | _dialogMessage, 230 | style: _messageStyle, 231 | textDirection: _direction, 232 | )), 233 | ], 234 | ), 235 | SizedBox(height: 4.0), 236 | Align( 237 | alignment: Alignment.bottomRight, 238 | child: Text( 239 | "$_progress/$_maxProgress", 240 | style: _progressTextStyle, 241 | textDirection: _direction, 242 | ), 243 | ), 244 | ], 245 | ), 246 | ), 247 | ); 248 | 249 | return _customBody ?? 250 | Container( 251 | padding: _dialogPadding, 252 | child: Column( 253 | mainAxisSize: MainAxisSize.min, 254 | children: [ 255 | // row body 256 | Row( 257 | mainAxisSize: MainAxisSize.min, 258 | children: [ 259 | const SizedBox(width: 8.0), 260 | _direction == TextDirection.ltr ? loader : text, 261 | const SizedBox(width: 8.0), 262 | _direction == TextDirection.rtl ? loader : text, 263 | const SizedBox(width: 8.0) 264 | ], 265 | ), 266 | ], 267 | ), 268 | ); 269 | } 270 | } 271 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 |