IndicatorService class
A service class to display and manage a custom indicator using a SnackBar.
This service allows showing a persistent indicator, such as a loading spinner or an animation with a logo, typically used to indicate ongoing processes like network requests. It leverages a GlobalKey<ScaffoldMessengerState> to display the indicator as a SnackBar at the bottom of the screen.
An indicator widget or a logo image must be provided during initialization.
If both are provided, the custom indicatorWidget takes precedence.
Constructors
-
IndicatorService({required BuildContext context, required GlobalKey<
ScaffoldMessengerState> smKey, Widget? indicatorWidget, ImageProvider<Object> ? logoImage}) - Creates an IndicatorService.
Properties
Methods
-
hide(
) → void - Hides the currently active indicator.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
) → void - Displays the indicator.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited