future_loading_dialog 0.2.1 copy "future_loading_dialog: ^0.2.1" to clipboard
future_loading_dialog: ^0.2.1 copied to clipboard

outdated

Easy to use adaptive loading dialog to visualize a Dart Future.

Future Loading Dialog #

Easy to use adaptive loading dialog to visualize a Dart Future.

Displays a loading dialog which reacts to the given [future]. The dialog will be dismissed and the value will be returned when the future completes. If an error occured, then [onError] will be called and this method returns null. Set [title] and [backLabel] to controll the look and feel or set [LoadingDialog.defaultTitle], [LoadingDialog.defaultBackLabel] and [LoadingDialog.defaultOnError] to have global preferences.

Example: #

Will display a loading dialog for one second.

MaterialApp(
  title: 'Test',
  home: Scaffold(
    body: Builder(
      builder: (context) => RaisedButton(
        child: Text('Test'),
        onPressed: () => showFutureLoadingDialog(
          context: context,
          future: () => Future.delayed(Duration(seconds: 1)),
        ),
      ),
    ),
  ),
);
3
likes
0
pub points
91%
popularity

Publisher

verified publisherfamedly.com

Easy to use adaptive loading dialog to visualize a Dart Future.

Homepage
Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on future_loading_dialog