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.

example/main.dart

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

String arabic = 'ar';
String indonesia = 'id';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
            floatingActionButtonTheme: FloatingActionButtonThemeData(
                backgroundColor: Colors.blue.shade800),
            colorScheme: ColorScheme.light(primary: Colors.blue.shade800)),
        home: const HomeView());
  }
}

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'),
          ),
        ));
  }
}
1
likes
145
points
28
downloads

Publisher

verified publisherrencanggunung.com

Weekly Downloads

A new Flutter package for Modal Loading Progress Animation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on animation_load_progress