Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Circular Progress Indicator Using Image

Tags:

flutter

dart

I Want to use my App icon during the loading. How it can be implemented. Currently I am using Circular Progress Indicator.

return Center(
       child: CircularProgressIndicator(
               strokeWidth: 2));
like image 310
Wasiq Hussain Avatar asked Jun 15 '26 18:06

Wasiq Hussain


1 Answers

If all you want is simple progress indicator you can use this

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

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 50,
      height: 50,
      child: Stack(
        alignment: Alignment.center,
        children: [
          Image.network(
            // you can replace this with Image.asset
            'https://avatars.githubusercontent.com/u/1393171?s=50&v=4',
            fit: BoxFit.cover,
            height: 30,
            width: 30,
          ),
          // you can replace
          const CircularProgressIndicator(
            valueColor: AlwaysStoppedAnimation<Color>(Colors.orange),
            strokeWidth: 0.7,
          ),
        ],
      ),
    );
  }
}

enter image description here

But if you are looking for something complex I will suggest you to go with

  • rive package
  • lottie package
like image 83
Ratakondala Arun Avatar answered Jun 17 '26 07:06

Ratakondala Arun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!