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

A simple and customizable overlay loader using GetX in Flutter.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(title: const Text("Overlay Loader Demo")),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              await AnyWhereLoader.instance.runWithLoader(
                asyncFunction: () async {
                  await Future.delayed(const Duration(seconds: 5));
                },
                text: "Loading, please wait...",
              );
            },
            child: const Text("Show Loader"),
          ),
        ),
      ),
    );
  }
}
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