anywhere_loader 1.0.2 copy "anywhere_loader: ^1.0.2" to clipboard
anywhere_loader: ^1.0.2 copied to clipboard

A simple and customizable overlay loader using GetX in Flutter.

Anywhere Loader #

A Flutter package that provides an easy-to-use overlay loader using GetX, allowing users to display a loading indicator without manually managing overlays or stacks. The loader supports customization such as font size, color, font family, and custom widgets.

Features #

  • 🟢 Uses Overlay instead of Stack for smooth integration.
  • 🎨 Customizable font size, font color, and font family.
  • 🔄 Supports async operations.
  • 🔍 Blur effect on background while loading.
  • 🚀 Simple API: Just wrap your widget and call startLoader().

Installation #

Add this to your pubspec.yaml:

dependencies:
anywhere_loader: latest_version

Then run:

flutter pub get

Usage #

1️⃣ Wrap Your App with AnywhereLoader #

In your main.dart, wrap the app with AnywhereLoader:

import 'package:flutter/material.dart';
import 'package:anywhere_loader/anywhere_loader.dart';

void main() {
  runApp(AnywhereLoader(
    child: MyApp(),
  ));
}

2️⃣ Start and Stop Loader #

To start the loader anywhere in your app:

AnywhereLoader.instance.startLoader(
  text: "Loading data...",
  seconds: 5, // Default is 10 seconds
  fontSize: 18,
  fontColor: Colors.white,
  fontFamily: 'Arial',
);

To stop the loader manually:

AnywhereLoader.instance.stopLoader();

3️⃣ Use Custom Loader Widget #

You can replace the default loader with your own widget:

AnywhereLoader.instance.startLoader(
  customWidget: Center(
    child: Column(
      mainAxisSize: MainAxisSize.min,
      children: [
        CircularProgressIndicator(),
        SizedBox(height: 10),
        Text("Fetching data...")
      ],
    ),
  ),
);

License #

This package is released under the MIT License.


7
likes
0
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

A simple and customizable overlay loader using GetX in Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, get

More

Packages that depend on anywhere_loader