PinTheme constructor

PinTheme({
  1. Color? activeColor,
  2. Color? selectedColor,
  3. Color? inactiveColor,
  4. Color? disabledColor,
  5. Color? activeFillColor,
  6. Color? selectedFillColor,
  7. Color? inactiveFillColor,
  8. Color? errorBorderColor,
  9. BorderRadius? borderRadius,
  10. double? fieldHeight,
  11. double? fieldWidth,
  12. double? borderWidth,
  13. double? activeBorderWidth,
  14. double? selectedBorderWidth,
  15. double? inactiveBorderWidth,
  16. double? disabledBorderWidth,
  17. double? errorBorderWidth,
  18. PinCodeFieldShape? shape,
  19. EdgeInsetsGeometry? fieldOuterPadding,
  20. List<BoxShadow>? activeBoxShadow,
  21. 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,
  );
}