MatrixInput constructor
const
MatrixInput({
- Key? key,
- double? width,
- double? height,
- AlignmentGeometry? alignment,
- EdgeInsetsGeometry? padding,
- Color? color,
- Decoration? decoration,
- Decoration? foregroundDecoration,
- TextEditingController? matrixController,
- bool enabled = true,
- bool readOnly = false,
- TextInputAction? textInputAction,
- int? maxLength,
- TextInputType? keyboardType,
- TextAlign textAlign = TextAlign.start,
- Color? cursorColor,
- int? maxLines = 1,
- int? minLines,
- TextDirection? textDirection,
- InputDecoration? inputDecoration = const InputDecoration(),
- Color matrixBorderColor = const Color(0xFF000000),
- TextStyle? style,
Implementation
const MatrixInput(
{Key? key,
this.width,
this.height,
this.alignment,
this.padding,
this.color,
this.decoration,
this.foregroundDecoration,
this.matrixController,
this.enabled = true,
this.readOnly = false,
this.textInputAction,
this.maxLength,
this.keyboardType,
this.textAlign = TextAlign.start,
this.cursorColor,
this.maxLines = 1,
this.minLines,
this.textDirection,
this.inputDecoration = const InputDecoration(),
this.matrixBorderColor = const Color(0xFF000000),
this.style})
: assert(maxLines == null || maxLines > 0),
assert(minLines == null || minLines > 0),
assert(
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
"minLines can't be greater than maxLines",
),
assert(maxLength == null ||
maxLength == TextField.noMaxLength ||
maxLength > 0),
// Assert the following instead of setting it directly to avoid surprising the user by silently changing the value they set.
assert(
!identical(textInputAction, TextInputAction.newline) ||
maxLines == 1 ||
!identical(keyboardType, TextInputType.text),
'Use keyboardType TextInputType.multiline when using TextInputAction.newline on a multiline TextField.',
),
super(key: key);