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. PinCodeFieldShape? shape,
  14. EdgeInsetsGeometry? fieldOuterPadding,
})

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,
    PinCodeFieldShape? shape,
    EdgeInsetsGeometry? fieldOuterPadding}) {
  final defaultValues = PinTheme.defaults();
  return PinTheme.defaults(
    activeColor:
        activeColor == null ? defaultValues.activeColor : activeColor,
    activeFillColor: activeFillColor == null
        ? defaultValues.activeFillColor
        : activeFillColor,
    borderRadius:
        borderRadius == null ? defaultValues.borderRadius : borderRadius,
    borderWidth:
        borderWidth == null ? defaultValues.borderWidth : borderWidth,
    disabledColor:
        disabledColor == null ? defaultValues.disabledColor : disabledColor,
    fieldHeight:
        fieldHeight == null ? defaultValues.fieldHeight : fieldHeight,
    fieldWidth: fieldWidth == null ? defaultValues.fieldWidth : fieldWidth,
    inactiveColor:
        inactiveColor == null ? defaultValues.inactiveColor : inactiveColor,
    inactiveFillColor: inactiveFillColor == null
        ? defaultValues.inactiveFillColor
        : inactiveFillColor,
    errorBorderColor: errorBorderColor == null
        ? defaultValues.errorBorderColor
        : errorBorderColor,
    selectedColor:
        selectedColor == null ? defaultValues.selectedColor : selectedColor,
    selectedFillColor: selectedFillColor == null
        ? defaultValues.selectedFillColor
        : selectedFillColor,
    shape: shape == null ? defaultValues.shape : shape,
    fieldOuterPadding: fieldOuterPadding == null
        ? defaultValues.fieldOuterPadding
        : fieldOuterPadding,
  );
}