How to work with progress indicator in flutter?

后端 未结 12 795
面向向阳花
面向向阳花 2020-12-02 05:29

I\'m newbie in flutter and wanted to know what is better way to add CircularProgressIndicator in my layout. For example, my login view. This view have username,

12条回答
  •  一生所求
    2020-12-02 05:50

    You can do it for center transparent progress indicator

    Future _submitDialog(BuildContext context) async {
      return await showDialog(
          context: context,
          barrierDismissible: false,
          builder: (BuildContext context) {
            return SimpleDialog(
              elevation: 0.0,
              backgroundColor: Colors.transparent,
              children: [
                Center(
                  child: CircularProgressIndicator(),
                )
              ],
            );
          });
    }
    

提交回复
热议问题