flutter - 具有行和列的颤动布局
解决方案
试试这个:
Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 150,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 40),
Text("UserName"),
SizedBox(height: 20),
Text("Password"),
RaisedButton(
color: Colors.grey,
onPressed: () {},
child: Text("OK"),
),
],
),
),
Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 200,
child: TextFormField(),
),
Container(
width: 200,
child: TextFormField(),
),
RaisedButton(
color: Colors.grey,
onPressed: () {},
child: Text("Cancel"),
),
],
),
],
),
推荐阅读
- javascript - 我正在编写一个弹出扩展程序,但我被困在设计中
- android - 如何在 webview Android 中处理多个窗口选项卡
- subshell - 在powershell中将当前工作目录传递给bash
- c# - 如何获取第二个逗号的索引?
- arangodb - ArangoDB 基于子属性的多个过滤器检索父对象
- android - Android SDK Sensoro 传感器服务不可用
- reactjs - React - 根据其他组件的位置渲染组件
- javascript - 播放或暂停音频时更改 innerHTML
- docker - db-migrate 在 docker deploy 找不到 heroku 配置变量
- c++ - 在 C++ 中修改常量向量