flutter_progress_dialog 0.1.0  flutter_progress_dialog: ^0.1.0 copied to clipboard
flutter_progress_dialog: ^0.1.0 copied to clipboard
A flutter library for the progress dialog. Easily show and hide. Support specify custom loading widget.
Flutter Progress Dialog #
[pub packages] | 中文说明
Flutter progress dialog. Support both Android and iOS platform.
The progress dialog just display one at the same time.
The usage inspired by OpenFlutter/flutter_oktoast

Usage #
1. Depend
Add this to you package's pubspec.yaml file:
dependencies:
  flutter_progress_dialog: ^0.1.0
2. Install
Run command:
$ flutter packages get
3. Import
Import in Dart code:
import 'package:flutter_progress_dialog/flutter_progress_dialog.dart';
4. Display Progress Dialog
Support two ways to display a progress dialog.
Wrap app widget
- Wrap your app widget
ProgressDialog(
  child: MaterialApp(),
);
- Exec showProgressDialog()anddismissProgressDialog()without parameters.
showProgressDialog();
//dismissProgressDialog();
Exec showProgressDialog() directly
You can exec showProgressDialog() without wrap app widget, should specify the param: context: BuildContext.
var dialog = showProgressDialog(context: context);
//dismissProgressDialog();
5. Properties
ProgressDialog have default style, and you also can custom style or other behavior.
| Name | Type | Desc | 
|---|---|---|
| loading | Widget | If specified, default widget will not show | 
| loadingText | String | Hint text, just for default widget | 
| textStyle | TextStyle | Hint text's style, just for default widget | 
| backgroundColor | Color | Background color of the progress dialog | 
| radius | double | Radius of the progress dialog | 
| onDismiss | Function | Callback for dismissed | 
| textDirection | TextDirection | Loading hint text's direction | 
| orientation | ProgressOrientation | The direction of spin kit and hint text | 
Example #
