progress_toast 1.1.0 copy "progress_toast: ^1.1.0" to clipboard
progress_toast: ^1.1.0 copied to clipboard

A lightweight progresss toast widget for Flutter, Easy to custom, Support iOS、Mac、Android and Web

ProgressToast

Add Dependencies #

add dependencies in pubspec.yaml file

 progress_toast: ^latest

Steps #

simulate network request, show loading toast and hide toast.

ProgressToast.loading(
                      context: context, message: 'LOADING...');
                  Future.delayed(const Duration(seconds: 3)).then((value) {
                    ProgressToast.dismiss();
                  });
```dart

simulate network request, show loading toast and show sucess text.

```dart
ProgressToast.loading(
                      context: context, message: 'LOADING...');
                  Future.delayed(const Duration(seconds: 3)).then((value) {
                    ProgressToast.text(context: context, message: 'SUCCESS!!!')
                  });
```dart

custom loading and text widget which you like.

```dart
 ProgressToast.loading(
                      context: context,
                      customWidget: Column(
                        mainAxisSize: MainAxisSize.min,
                        children: const <Widget>[
                          CupertinoActivityIndicator(
                              radius: 18, color: Colors.white),
                          SizedBox(height: 10),
                          Text('LOADING...',
                              overflow: TextOverflow.ellipsis,
                              textAlign: TextAlign.center,
                              maxLines: 2,
                              style: TextStyle(
                                fontSize: 20,
                                color: Colors.white,
                              ))
                        ],
                      ));
                  Future.delayed(const Duration(seconds: 3)).then((value) {
                    ProgressToast.text(
                        context: context,
                        customWidget: Column(
                          mainAxisSize: MainAxisSize.min,
                          children: const <Widget>[
                            Icon(
                              Icons.check_circle_outline,
                              size: 36,
                              color: Colors.green,
                            ),
                            SizedBox(height: 10),
                            Text('SUCCESS!!!',
                                overflow: TextOverflow.ellipsis,
                                textAlign: TextAlign.center,
                                maxLines: 2,
                                style: TextStyle(
                                  fontSize: 20,
                                  color: Colors.white,
                                ))
                          ],
                        ));
                  });
```dart


## More Information

For more cases, please follow up the example project.

Feel free to pull request when you found issues.

Welcome to connect Email:shawnli1201@gmail.com if you have any questiones.
 

1
likes
140
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight progresss toast widget for Flutter, Easy to custom, Support iOS、Mac、Android and Web

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on progress_toast