Skip to main content

可点击的组件

文本按钮

TextButton(
child: Text("Button"),
onPressed: () {},
)

轮廓按钮

ElevatedButton(
child: Text("Button"),
onPressed: () {},
)

图标按钮

IconButton(
icon: Icon(Icons.thumb_up),
onPressed: () {},
)

图标文字按钮

ElevatedButton.icon(
icon: Icon(Icons.send),
label: Text("发送"),
onPressed: () {},
),
TextButton.icon(
icon: Icon(Icons.info),
label: Text("详情"),
onPressed: () {},
),

涟漪按钮

InkWell(
onTap: () {},
child: null,
)

复杂手势按钮

GestureDetector(
onTap: () {},
onLongPress: () {},
child: null,
)