1. 按钮样式
源码 按钮 flutter TextButton样式
ElevatedButton(
child: Text("normal"),
onPressed: () {},
);
1.2. TextButton
TextButton(
child: Text("normal"),
onPressed: () {},
)
OutlineButton(
child: Text("normal"),
onPressed: () {},
)
IconButton(
icon: Icon(Icons.thumb_up),
onPressed: () {},
)
1.5. 带图标的按钮
ElevatedButton.icon(
icon: Icon(Icons.send),
label: Text("发送"),
onPressed: _onPressed,
),
OutlinedButton.icon(
icon: Icon(Icons.add),
label: Text("添加"),
onPressed: _onPressed,
),
TextButton.icon(
icon: Icon(Icons.info),
label: Text("详情"),
onPressed: _onPressed,
),