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

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
130
pub points
90%
popularity

Publisher

verified publisherfamedly.com

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

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

async, flutter

More

Packages that depend on future_loading_dialog