toJson method

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

Implementation

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

  return <String, dynamic>{
    'actionsIconTheme':
        const NullableIconThemeDataConverter().toJson(value.actionsIconTheme),
    'backgroundColor':
        const NullableColorConverter().toJson(value.backgroundColor) ??
            const NullableColorConverter().toJson(value.color),
    'backwardsCompatibility': value.backwardsCompatibility,
    'brightness':
        const NullableBrightnessConverter().toJson(value.brightness),
    'centerTitle': value.centerTitle,
    'elevation': value.elevation,
    'foregroundColor':
        const NullableColorConverter().toJson(value.foregroundColor),
    'iconTheme':
        const NullableIconThemeDataConverter().toJson(value.iconTheme),
    'shadowColor': const NullableColorConverter().toJson(value.shadowColor),
    'systemOverlayStyle': const NullableSystemUiOverlayStyleConverter()
        .toJson(value.systemOverlayStyle),
    'textTheme': const NullableTextThemeConverter().toJson(value.textTheme),
    'titleSpacing': value.titleSpacing,
    'titleTextStyle':
        const NullableTextStyleConverter().toJson(value.titleTextStyle),
    'toolbarTextStyle':
        const NullableTextStyleConverter().toJson(value.toolbarTextStyle),
  };

  throw 'Json_Unsuported_Value';
}