AppTableCell.text constructor
AppTableCell.text({
- required String text,
- TextStyle textStyle = const TextStyle(fontSize: 14, color: Color(0xFF333333)),
- double height = 40,
- Color backgroundColor = const Color(0xFFFFFFFF),
- Color? selectRowColor,
- AlignmentGeometry alignment = Alignment.center,
- EdgeInsets padding = const EdgeInsets.all(0),
- Key? key,
创建一个展示文本的 Cell
text
文本内容
textStyle
文本样式
height
文本对齐方式
backgroundColor
单元格的背景颜色
selectRowColor
单元格选中时的背景颜色
Implementation
factory AppTableCell.text({
required String text,
TextStyle textStyle = const TextStyle(
fontSize: 14,
color: Color(0xFF333333),
),
double height = 40,
Color backgroundColor = const Color(0xFFFFFFFF),
Color? selectRowColor,
AlignmentGeometry alignment = Alignment.center,
EdgeInsets padding = const EdgeInsets.all(0),
Key? key,
}) =>
AppTableCell(
builder: (context) => Text(text, style: textStyle, key: key),
height: height,
backgroundColor: backgroundColor,
selectRowColor: selectRowColor,
alignment: alignment,
padding: padding,
);