Skip to content
On this page

Cell 单元格

代码演示

基本用法

dart
CellGroup(children: [
  Cell(title: "单元格", value: "内容"),
  Cell(title: "单元格", value: "内容", label: "描述信息"),
]),

图标

dart
Cell(title: "单元格", value: "内容", icon: VanIcons.location_o),

右侧箭头 & 图标

dart
Cell(title: "单元格", arrow: VanIcons.arrow),
Cell(title: "单元格", value: "内容", arrow: VanIcons.arrow),
Cell(title: "单元格", value: "内容", arrow: VanIcons.arrow_down),

垂直居中

dart
Cell(title: "单元格", value: "内容", label: "描述信息", center: true),

单元格组

dart
CellGroup(children: [
  Cell(title: "单元格", value: "内容"),
  Cell(title: "单元格", value: "内容", label: "描述信息"),
]),

点击触发事件

dart
CellGroup(children: [
  Cell(title: "单元格", value: "内容", clickable: true),
  Cell(title: "单元格", value: "内容", label: "描述信息", clickable: true),
]),

API

Props类型描述
titleWidget | String | null标题
valueWidget | String | null当前值
labelString副标题
iconWidget | IconData左侧图标
arrowtrue | Widget | IconData右侧箭头
centerbool垂直居中
prefixWidget左侧前缀
clickablebool可点击并触发
onTapFunction()点击回调