PinTheme constructor
PinTheme({
- Color? activeColor,
- Color? selectedColor,
- Color? inactiveColor,
- Color? disabledColor,
- Color? activeFillColor,
- Color? selectedFillColor,
- Color? inactiveFillColor,
- Color? errorBorderColor,
- BorderRadius? borderRadius,
- double? fieldHeight,
- double? fieldWidth,
- double? borderWidth,
- double? activeBorderWidth,
- double? selectedBorderWidth,
- double? inactiveBorderWidth,
- double? disabledBorderWidth,
- double? errorBorderWidth,
- PinCodeFieldShape? shape,
- EdgeInsetsGeometry? fieldOuterPadding,
- List<
BoxShadow> ? activeBoxShadow, - List<
BoxShadow> ? inActiveBoxShadow,
Implementation
factory PinTheme({
Color? activeColor,
Color? selectedColor,
Color? inactiveColor,
Color? disabledColor,
Color? activeFillColor,
Color? selectedFillColor,
Color? inactiveFillColor,
Color? errorBorderColor,
BorderRadius? borderRadius,
double? fieldHeight,
double? fieldWidth,
double? borderWidth,
double? activeBorderWidth,
double? selectedBorderWidth,
double? inactiveBorderWidth,
double? disabledBorderWidth,
double? errorBorderWidth,
PinCodeFieldShape? shape,
EdgeInsetsGeometry? fieldOuterPadding,
List<BoxShadow>? activeBoxShadow,
List<BoxShadow>? inActiveBoxShadow,
}) {
final defaultValues = PinTheme.defaults();
return PinTheme.defaults(
activeColor: activeColor ?? defaultValues.activeColor,
activeFillColor: activeFillColor ?? defaultValues.activeFillColor,
borderRadius: borderRadius ?? defaultValues.borderRadius,
borderWidth: borderWidth ?? defaultValues.borderWidth,
disabledColor: disabledColor ?? defaultValues.disabledColor,
fieldHeight: fieldHeight ?? defaultValues.fieldHeight,
fieldWidth: fieldWidth ?? defaultValues.fieldWidth,
inactiveColor: inactiveColor ?? defaultValues.inactiveColor,
inactiveFillColor: inactiveFillColor ?? defaultValues.inactiveFillColor,
errorBorderColor: errorBorderColor ?? defaultValues.errorBorderColor,
selectedColor: selectedColor ?? defaultValues.selectedColor,
selectedFillColor: selectedFillColor ?? defaultValues.selectedFillColor,
shape: shape ?? defaultValues.shape,
fieldOuterPadding: fieldOuterPadding ?? defaultValues.fieldOuterPadding,
activeBoxShadows: activeBoxShadow ?? [],
inActiveBoxShadows: inActiveBoxShadow ?? [],
activeBorderWidth: activeBorderWidth ?? defaultValues.activeBorderWidth,
inactiveBorderWidth:
inactiveBorderWidth ?? defaultValues.inactiveBorderWidth,
selectedBorderWidth:
selectedBorderWidth ?? defaultValues.selectedBorderWidth,
errorBorderWidth: errorBorderWidth ?? defaultValues.errorBorderWidth,
disabledBorderWidth:
disabledBorderWidth ?? defaultValues.disabledBorderWidth,
);
}