Loader class
A utility class for displaying and hiding a loading overlay dialog.
The Loader class provides static methods to show and hide a modal loading
indicator using the Get.dialog method from the GetX package. The overlay
prevents user interaction while loading is in progress.
Example usage:
Loader.show(context: context);
// Perform async operation...
Loader.hide();
- isLoading: Indicates whether the loading overlay is currently visible.
- show: Displays the loading overlay. Optionally accepts a custom
loadingWidgetandcontext. Throws an exception ifGetMaterialAppis not used as the app root. - hide: Hides the loading overlay if it is currently visible.
Note: Ensure your app is wrapped with GetMaterialApp for this to work.
Constructors
- Loader()
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
-
hide(
) → void -
show(
{BuildContext? context, Widget loadingWidget = const CircularProgressIndicator()}) → void