MatrixInput constructor

const MatrixInput({
  1. Key? key,
  2. double? width,
  3. double? height,
  4. AlignmentGeometry? alignment,
  5. EdgeInsetsGeometry? padding,
  6. Color? color,
  7. Decoration? decoration,
  8. Decoration? foregroundDecoration,
  9. TextEditingController? matrixController,
  10. bool enabled = true,
  11. bool readOnly = false,
  12. TextInputAction? textInputAction,
  13. int? maxLength,
  14. TextInputType? keyboardType,
  15. TextAlign textAlign = TextAlign.start,
  16. Color? cursorColor,
  17. int? maxLines = 1,
  18. int? minLines,
  19. TextDirection? textDirection,
  20. InputDecoration? inputDecoration = const InputDecoration(),
  21. Color matrixBorderColor = const Color(0xFF000000),
  22. 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);