解决方案

class LogingUi extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var size = MediaQuery.of(context).size;
    // TODO: implement build
    return new Stack(
      fit: StackFit.loose,
      children: <Widget>[
        new Container(
          color: Colors.white,
          width: size.width,
          height: size.height,
        ),
        new Column(
          mainAxisSize: MainAxisSize.max,
          children: <Widget>[
            new Container(
              padding: EdgeInsets.all(30),
            ),
            new Row(
              mainAxisAlignment: MainAxisAlignment.center, //对其方式
              children: <Widget>[
                new Image.asset(
                  "images/login_logo.png",
                  width: 119,
                  height: 151,
                  fit: BoxFit.fill,
                ),
              ],
            ),
            new Row(
              children: <Widget>[
                new Expanded(
                    child: new TextField(

                        //相当于Android属性hint
                        decoration: new InputDecoration(
                  hintText: "用户名",
                )))
              ],
            )
          ],
        ),
      ],
    );
  }
}
Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐