IDSLoader class
IDS Loader SDK
A simple and reusable SDK to manage loading indicators and error messages within your Flutter applications.
Features:
- Show a full-screen loading indicator with customizable color.
- Programmatically hide the loading indicator.
- Display error messages using a SnackBar with a dismiss option.
Usage:
1. Import the SDK:
import 'package:your_sdk_name/ids_loader.dart';
2. Initialize the loader:
final loader = IDSLoader(context);
3. Show loader:
loader.showLoader();
4. Hide loader:
loader.hideLoader();
5. Show error message:
loader.showError('An error occurred!');
Customization:
Customize the loader color by providing the loaderColor parameter:
final loader = IDSLoader(context, loaderColor: Colors.blue);
Note:
The internal implementation is hidden in a private class _AppLoader
to protect business logic from public access.
A class that manages the display and hiding of a loader.
The IDSLoader class provides methods to show and hide a loading spinner in the application. It uses the IDSAppLoader
for the actual implementation of the loader and allows customization of the loader's color.
Example usage:
IDSLoader loader = IDSLoader(context);
loader.showLoader();
loader.hideLoader();
Constructors
- IDSLoader(BuildContext context, {Color loaderColor = Colors.white})
- Creates an instance of IDSLoader with the specified BuildContext and optional loader color.
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
- 
  hideLoader() → Future< void> 
- Hides the loader from the screen.
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  showLoader() → Future< void> 
- Shows the loader on the screen.
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited