defaultDigitContainerBuilder static method
Default builder for digitContainerBuilder: a 50x60 rounded rectangle
with a 1px border that switches between activeBorderColor and
borderColor depending on isCurrentDigit.
Implementation
static Widget defaultDigitContainerBuilder({
required Color? backgroundColor,
required bool isCurrentDigit,
required Color? activeBorderColor,
required Color? borderColor,
required Widget child,
}) {
return Container(
margin: const Pad(horizontal: 3.0),
width: 50.0,
height: 60.0,
decoration: ShapeDecoration(
color: backgroundColor ?? Colors.grey[200],
shape: RoundedRectangleBorder(
side: BorderSide(
color: (isCurrentDigit
? (activeBorderColor ?? Colors.grey[400]!)
: (borderColor ?? Colors.grey[400]!)),
width: 1.0,
),
borderRadius: const BorderRadius.all(Radius.circular(6)),
),
),
child: child,
);
}