How to set size to CircularProgressIndicator?

后端 未结 7 1471
太阳男子
太阳男子 2020-12-08 13:01

I\'m trying to make a loading screen for my application, I\'m using CircularProgressIndicator widget, but I want to know if there\'s a way to make it bigger in

7条回答
  •  醉话见心
    2020-12-08 13:27

    You can control the size of the indicator better if you wrap it with a Column Widget. It doesn't hurt, but gets the job done. In my case is was using a small loading indicator inside a button.

    Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Center(
          child: Container(
            height: 20,
            width: 20,
            margin: EdgeInsets.all(5),
            child: CircularProgressIndicator(
              strokeWidth: 2.0,
              valueColor : AlwaysStoppedAnimation(Colors.white),
            ),
          ),
        ),
      ],
    );
    

提交回复
热议问题