animation_load_progress 0.0.4 copy "animation_load_progress: ^0.0.4" to clipboard
animation_load_progress: ^0.0.4 copied to clipboard

A new Flutter package for Modal Loading Progress Animation.

Animation Load Progress #

usage #

class HomeView extends StatefulWidget {
  const HomeView({super.key});

  @override
  State<HomeView> createState() => _HomeViewState();
}

class _HomeViewState extends State<HomeView> {
  bool isAsync = false; //add variable

  void signIn() {
    isAsync = true;
    setState(() {});
    Future.delayed(
      const Duration(
        seconds: 3,
      ),
      () {
        isAsync = false;
        setState(() {});
      },
    );
  }

  @override
  void initState() {
    signIn();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return AnimationLoadProgress(
        inAsyncCall: isAsync,
        colorProgress: Colors.red, //choose your colors
        child: Scaffold(
          backgroundColor: Colors.white,
          appBar: AppBar(
            backgroundColor: Colors.white,
            title: const Text(
              'Loading ...',
              style: TextStyle(color: Colors.white),
            ),
            centerTitle: true,
          ),
          body: const Center(
            child: Text('Loading Example'),
          ),
        ));
  }
}
copied to clipboard
1
likes
140
points
23
downloads

Publisher

verified publisherrencanggunung.com

Weekly Downloads

2024.07.08 - 2025.01.20

A new Flutter package for Modal Loading Progress Animation.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on animation_load_progress