rectangle method Null safety

CodeInputBuilder rectangle(
  1. {Size totalSize = const Size(50.0, 60.0),
  2. Size emptySize = const Size(20.0, 20.0),
  3. Size filledSize = const Size(40.0, 60.0),
  4. BorderRadius borderRadius = BorderRadius.zero,
  5. required Border border,
  6. required Color color,
  7. required TextStyle textStyle}
)

Builds the input inside a rectangle.

Implementation

static CodeInputBuilder rectangle({
  Size totalSize = const Size(50.0, 60.0),
  Size emptySize = const Size(20.0, 20.0),
  Size filledSize = const Size(40.0, 60.0),
  BorderRadius borderRadius = BorderRadius.zero,
  required Border border,
  required Color color,
  required TextStyle textStyle,
}) {
  final decoration = BoxDecoration(
    border: border,
    borderRadius: borderRadius,
    color: color,
  );

  return containerized(
      totalSize: totalSize,
      emptySize: emptySize,
      filledSize: filledSize,
      emptyDecoration: decoration,
      filledDecoration: decoration,
      emptyTextStyle: textStyle.copyWith(fontSize: 0.0),
      filledTextStyle: textStyle);
}