AppTableCell.textEdit constructor
AppTableCell.textEdit({
- required String text,
- TextStyle textStyle = const TextStyle(fontSize: 14, color: Color(0xFF333333)),
- double height = 40,
- Color backgroundColor = const Color(0xFFFFFFFF),
- TextEditingController? controller,
- Color? selectRowColor,
- AlignmentGeometry alignment = Alignment.center,
- EdgeInsets padding = const EdgeInsets.all(0),
- List<
TextInputFormatter> inputFormatters = const [], - TextInputType? keyboardType,
- Key? key,
- ValueChanged<
String?> ? onSubmitted,
创建一个可以编辑的Cell
text 文本内容
textStyle 文本样式
height 文本对齐方式
backgroundColor 单元格的背景颜色
controller 文本控制器
selectRowColor 单元格选中时的背景颜色
Implementation
factory AppTableCell.textEdit({
required String text,
TextStyle textStyle = const TextStyle(
fontSize: 14,
color: Color(0xFF333333),
),
double height = 40,
Color backgroundColor = const Color(0xFFFFFFFF),
TextEditingController? controller,
Color? selectRowColor,
AlignmentGeometry alignment = Alignment.center,
EdgeInsets padding = const EdgeInsets.all(0),
List<TextInputFormatter> inputFormatters = const [],
TextInputType? keyboardType,
Key? key,
ValueChanged<String?>? onSubmitted,
}) =>
AppTableCell(
builder: (context) => AppTableEditCell(
text: text,
textStyle: textStyle,
controller: controller,
inputFormatters: inputFormatters,
keyboardType: keyboardType,
key: key,
onSubmitted: onSubmitted,
),
height: height,
backgroundColor: backgroundColor,
selectRowColor: selectRowColor,
alignment: alignment,
padding: padding,
);