AppTableCell.textEdit constructor

AppTableCell.textEdit({
  1. required String text,
  2. TextStyle textStyle = const TextStyle(fontSize: 14, color: Color(0xFF333333)),
  3. double height = 40,
  4. Color backgroundColor = const Color(0xFFFFFFFF),
  5. TextEditingController? controller,
  6. Color? selectRowColor,
  7. AlignmentGeometry alignment = Alignment.center,
  8. EdgeInsets padding = const EdgeInsets.all(0),
  9. List<TextInputFormatter> inputFormatters = const [],
  10. TextInputType? keyboardType,
  11. Key? key,
  12. 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,
    );