toJson method

  1. @override
Map<String, dynamic>? toJson(
  1. TimePickerThemeData? value
)
override

Implementation

@override
Map<String, dynamic>? toJson(TimePickerThemeData? value) {
  if (value == null) return null;

  return <String, dynamic>{
    'backgroundColor':
        const NullableColorConverter().toJson(value.backgroundColor),
    'dayPeriodBorderSide':
        const NullableBorderSideConverter().toJson(value.dayPeriodBorderSide),
    'dayPeriodColor':
        const NullableColorConverter().toJson(value.dayPeriodColor),
    'dayPeriodShape':
        const NullableShapeBorderConverter().toJson(value.dayPeriodShape),
    'dayPeriodTextColor':
        const NullableColorConverter().toJson(value.dayPeriodTextColor),
    'dayPeriodTextStyle':
        const NullableTextStyleConverter().toJson(value.dayPeriodTextStyle),
    'dialBackgroundColor':
        const NullableColorConverter().toJson(value.dialBackgroundColor),
    'dialHandColor':
        const NullableColorConverter().toJson(value.dialHandColor),
    'dialTextColor':
        const NullableColorConverter().toJson(value.dialTextColor),
    'entryModeIconColor':
        const NullableColorConverter().toJson(value.entryModeIconColor),
    'helpTextStyle':
        const NullableTextStyleConverter().toJson(value.helpTextStyle),
    'hourMinuteColor':
        const NullableColorConverter().toJson(value.hourMinuteColor),
    'hourMinuteShape':
        const NullableShapeBorderConverter().toJson(value.hourMinuteShape),
    'hourMinuteTextColor':
        const NullableColorConverter().toJson(value.hourMinuteTextColor),
    'hourMinuteTextStyle':
        const NullableTextStyleConverter().toJson(value.hourMinuteTextStyle),
    'inputDecorationTheme': const NullableInputDecorationThemeConverter()
        .toJson(value.inputDecorationTheme),
    'shape': const NullableShapeBorderConverter().toJson(value.shape),
  };

  throw 'Json_Unsuported_Value';
}