相关疑难解决方法(0)

在 Flutter 中将 CircularProgressIndicator 显示在前面

我想在其他小部件前面显示一个类似加载的圆形条。下面是我目前使用的代码。它显示循环加载,但它在其他小部件之间。

它应该在上面。根据我尝试使用 Stack 的建议,但它仍然显示在小部件之间。我在这里做错了什么?

class LoginPage extends StatefulWidget {
  @override
  _LoginPageState createState() => _LoginPageState();

}

class _LoginPageState extends State<LoginPage> {

 bool visible = true ; //Testing purpose it is true. Actually it is false.    
@override

Widget build(BuildContext context) {

return Scaffold(
  key: _scaffoldKey,
  body: Stack(
        children: <Widget>[
          new Container(
            decoration: BoxDecoration(
          gradient: LinearGradient(
              begin: Alignment.topRight,
              end: FractionalOffset.bottomCenter,//Alignment.bottomLeft,

              colors: [Colors.green[900], Colors.lightBlueAccent]),
        ),

          ),SingleChildScrollView(
            child: new Form(
              key: _formKey,
              autovalidate: _autoValidate,
    child: Center(
    child: Column(
      children: <Widget>[
        Row(
                  children: <Widget>[
                    VerticalText(),
                    TextLogin(), …
Run Code Online (Sandbox Code Playgroud)

dart flutter

2
推荐指数
2
解决办法
4856
查看次数

标签 统计

dart ×1

flutter ×1