any_loading 0.0.2 copy "any_loading: ^0.0.2" to clipboard
any_loading: ^0.0.2 copied to clipboard

Use without context, showToast/showLoading/showNetLoading/showModal for Flutter.

any_loading #

Pub support

Use without context, showToast/showSuccess/showError/showLoading/showNetLoading/showModal for Flutter.

Features #

  • support Toast, ModalDialog, Loading.
  • support NetLoading. Block the ui event to delay the display of the loading bar for a few seconds.

Getting started #

Add the package to your pubspec.yaml:

dependencies:
  any_loading: <latest_version>

Usage #

First, initialize AnyLoading in your MaterialApp or CupertinoApp:

MaterialApp(
    title: 'Flutter Demo',
    theme: ThemeData(
    primarySwatch: Colors.blue,
    ),
    home: const TestPage(),
    builder: AnyLoading.init(),
)

Then, you can:

AnyLoading.showToast('msg');
AnyLoading.showModal(title: 'title', content: 'content', success: (bool isSuccess) => print('isSuccess--->$isSuccess'));
AnyLoading.showLoading(title: 'Loading', maskType: AnyLoadingMaskType.black, style:AnyLoadingStyle.dark());
AnyLoading.showNetLoading(title: 'Loading', position: AlignmentDirectional.center, 
                          delayShowIndicatorDuration: Duration(seconds: 5));
AnyLoading.dismiss();
// ...
1
likes
160
pub points
36%
popularity

Publisher

unverified uploader

Use without context, showToast/showLoading/showNetLoading/showModal for Flutter.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, flutter_spinkit

More

Packages that depend on any_loading