SStandby class
Overlay utility to show a progress indicator while a Future is running.
The provided future is wrapped in a CancelableOperation internally so
that dismissing the overlay (background tap or programmatic dismissal) will
attempt to cancel the underlying computation.
The onDismissed callback reports how the overlay ended:
wasSuccessful == true: Future completed successfullywasSuccessful == false: Future completed with error (seeerror/stackTrace)wasSuccessful == null: dismissed before completion (user cancelled)
Constructors
- SStandby()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
dismiss(
String id) → void - Dismiss the overlay if present, and cancel the in-flight operation (if any).
-
hide(
String id) → void -
show<
T> ({required Future< T> future, required String id, FutureOr<void> onCancel()?, void onDismissed({Object? error, StackTrace? stackTrace, bool? wasSuccessful})?, String? title, bool isDismissible = true, double dismissibleBarrierOpacity = 0.5, WidgetBuilder? waitingBuilder, Widget errorBuilder(BuildContext context, Object? error, StackTrace? stackTrace)?, WidgetBuilder? successBuilder, bool successDismissible = true, Duration? successAutoDismissAfter, Duration? timeout, Widget timeoutBuilder(BuildContext context, Object? error, StackTrace? stackTrace)?, Decoration? waitingDecoration, EdgeInsetsGeometry waitingPadding = const EdgeInsets.all(8.0), Decoration? errorDecoration, EdgeInsetsGeometry errorPadding = const EdgeInsets.all(8.0), String? semanticsLabelWaiting, String? semanticsLabelError, String? semanticsLabelSuccess, bool announceTransitions = false, double indicatorSize = 20, double indicatorStrokeWidth = 3, Color? indicatorColor, Widget? indicator}) → void