小编mar*_*drb的帖子

在Row Flutter中设置Elements之间的空间

码:

new Container(
          alignment: FractionalOffset.center,
          child: new Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: <Widget>[
              new FlatButton(
                child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))),
              ),
              new FlatButton(
                child: new Text('Register.', style: new TextStyle(color: Color(0xFF84A2AF), fontWeight: FontWeight.bold),),
                onPressed: moveToRegister,
              )
            ],
          ),
        ),  
Run Code Online (Sandbox Code Playgroud)

这是结果:https:
//www.dropbox.com/s/sxklyutyvbbura8/Screenshot_20181104-150928.png?dl = 0

如何确定两个FlatButton元素并排,屏幕宽度中心之间没有空间?

row dart flutter

14
推荐指数
7
解决办法
3万
查看次数

TextFormFields 之间的空间

我正在开发 Flutter 应用程序。
我有这个飞镖代码:

List<Widget> buildInputs() {
    return[
      new Container(
        padding: new EdgeInsets.only(
          top: 20.0,
          right: 40.0,
          left: 40.0,
        ),
        child: new Column(
          children: <Widget>[
            new TextFormField(
              decoration: new InputDecoration(labelText: 'E-Mail', contentPadding: new EdgeInsets.only(bottom: 1.0)),
              validator: (value) => value.isEmpty ? 'Email can\'nt be empty' : null,
              onSaved: (value) => _email = value,
              ),
            new TextFormField(
              decoration: new InputDecoration(labelText: 'Password', contentPadding: new EdgeInsets.only(bottom: 1.0)),
              obscureText: true,
              validator: (value) => value.isEmpty ? 'Password can\'nt be empty' : null,
              onSaved: (value) => _password …
Run Code Online (Sandbox Code Playgroud)

user-interface uitextfield dart flutter

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

标签 统计

dart ×2

flutter ×2

row ×1

uitextfield ×1

user-interface ×1