future_loading_dialog library

Extensions

DeprecatedApiAccessExtension on Result<T>

Functions

showFutureLoadingDialog<T>({required BuildContext context, required Future<T> future(), String? title, String? backLabel, String onError(dynamic exception)?, bool barrierDismissible = false}) Future<Result<T>>
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.