带有行和列的颤振布局
flutter layout with row and column
我是 flutter 新手
我想创建 flutter 布局作为图像
请帮忙。
提前致谢。
layout like this
试试这个:
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"),
),
],
),
],
),
我是 flutter 新手 我想创建 flutter 布局作为图像 请帮忙。 提前致谢。
layout like this
试试这个:
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"),
),
],
),
],
),