toJson method
Implementation
@override
Map<String, dynamic>? toJson(ThemeData? object) {
if (object == null) return null;
return <String, dynamic>{
'accentColor': const NullableColorConverter().toJson(object.accentColor),
'accentColorBrightness': const NullableBrightnessConverter()
.toJson(object.accentColorBrightness),
'accentIconTheme':
const NullableIconThemeDataConverter().toJson(object.accentIconTheme),
'accentTextTheme':
const NullableTextThemeConverter().toJson(object.accentTextTheme),
'appBarTheme':
const NullableAppBarThemeConverter().toJson(object.appBarTheme),
'applyElevationOverlayColor': object.applyElevationOverlayColor,
'bannerTheme': const NullableMaterialBannerThemeDataConverter()
.toJson(object.bannerTheme),
'backgroundColor':
const NullableColorConverter().toJson(object.backgroundColor),
'bottomAppBarColor':
const NullableColorConverter().toJson(object.bottomAppBarColor),
'bottomAppBarTheme': const NullableBottomAppBarThemeConverter()
.toJson(object.bottomAppBarTheme),
'bottomNavigationBarTheme':
const NullableBottomNavigationBarThemeDataConverter().toJson(
object.bottomNavigationBarTheme,
),
'bottomSheetTheme': const NullableBottomSheetThemeDataConverter()
.toJson(object.bottomSheetTheme),
'brightness':
const NullableBrightnessConverter().toJson(object.brightness),
'buttonColor': const NullableColorConverter().toJson(object.buttonColor),
'buttonBarTheme': const NullableButtonBarThemeDataConverter()
.toJson(object.buttonBarTheme),
'buttonTheme':
const NullableButtonThemeDataConverter().toJson(object.buttonTheme),
'canvasColor': const NullableColorConverter().toJson(object.canvasColor),
'cardColor': const NullableColorConverter().toJson(object.cardColor),
'cardTheme': const NullableCardThemeConverter().toJson(object.cardTheme),
'chipTheme':
const NullableChipThemeDataConverter().toJson(object.chipTheme),
'colorScheme':
const NullableColorSchemeConverter().toJson(object.colorScheme),
'cupertinoOverrideTheme': const NullableCupertinoThemeDataConverter()
.toJson(object.cupertinoOverrideTheme as CupertinoThemeData?),
'dataTableTheme': const NullableDataTableThemeDataConverter()
.toJson(object.dataTableTheme),
'dialogBackgroundColor':
const NullableColorConverter().toJson(object.dialogBackgroundColor),
'dialogTheme':
const NullableDialogThemeConverter().toJson(object.dialogTheme),
'disabledColor':
const NullableColorConverter().toJson(object.disabledColor),
'dividerColor':
const NullableColorConverter().toJson(object.dividerColor),
'dividerTheme':
const NullableDividerThemeDataConverter().toJson(object.dividerTheme),
'elevatedButtonTheme':
const NullableElevatedButtonThemeDataConverter().toJson(
object.elevatedButtonTheme,
),
'errorColor': const NullableColorConverter().toJson(object.errorColor),
'fixTextFieldOutlineLabel': object.fixTextFieldOutlineLabel,
'floatingActionButtonTheme':
const NullableFloatingActionButtonThemeDataConverter().toJson(
object.floatingActionButtonTheme,
),
'focusColor': const NullableColorConverter().toJson(object.focusColor),
'highlightColor':
const NullableColorConverter().toJson(object.highlightColor),
'hintColor': const NullableColorConverter().toJson(object.hintColor),
'hoverColor': const NullableColorConverter().toJson(object.hoverColor),
'iconTheme':
const NullableIconThemeDataConverter().toJson(object.iconTheme),
'indicatorColor':
const NullableColorConverter().toJson(object.indicatorColor),
'inputDecorationTheme':
const NullableInputDecorationThemeConverter().toJson(
object.inputDecorationTheme,
),
'materialTapTargetSize':
const NullableMaterialTapTargetSizeConverter().toJson(
object.materialTapTargetSize,
),
'navigationRailTheme':
const NullableNavigationRailThemeDataConverter().toJson(
object.navigationRailTheme,
),
'outlinedButtonTheme':
const NullableOutlinedButtonThemeDataConverter().toJson(
object.outlinedButtonTheme,
),
'platform':
const NullableTargetPlatformConverter().toJson(object.platform),
'popupMenuTheme': const NullablePopupMenuThemeDataConverter()
.toJson(object.popupMenuTheme),
'primaryColor':
const NullableColorConverter().toJson(object.primaryColor),
'primaryColorBrightness': const NullableBrightnessConverter().toJson(
object.primaryColorBrightness,
),
'primaryColorDark':
const NullableColorConverter().toJson(object.primaryColorDark),
'primaryColorLight':
const NullableColorConverter().toJson(object.primaryColorLight),
'primaryIconTheme': const NullableIconThemeDataConverter()
.toJson(object.primaryIconTheme),
'primaryTextTheme':
const NullableTextThemeConverter().toJson(object.primaryTextTheme),
'scaffoldBackgroundColor':
const NullableColorConverter().toJson(object.scaffoldBackgroundColor),
'secondaryHeaderColor':
const NullableColorConverter().toJson(object.secondaryHeaderColor),
'selectedRowColor':
const NullableColorConverter().toJson(object.selectedRowColor),
'shadowColor': const NullableColorConverter().toJson(object.shadowColor),
'sliderTheme':
const NullableSliderThemeDataConverter().toJson(object.sliderTheme),
'snackBarTheme': const NullableSnackBarThemeDataConverter()
.toJson(object.snackBarTheme),
'splashColor': const NullableColorConverter().toJson(object.splashColor),
'splashFactory': const NullableInteractiveInkFeatureFactoryConverter()
.toJson(object.splashFactory),
'tabBarTheme':
const NullableTabBarThemeConverter().toJson(object.tabBarTheme),
'textButtonTheme': const NullableTextButtonThemeDataConverter()
.toJson(object.textButtonTheme),
'textSelectionTheme':
const NullableTextSelectionThemeDataConverter().toJson(
object.textSelectionTheme,
),
'textTheme': const NullableTextThemeConverter().toJson(object.textTheme),
'toggleButtonsTheme':
const NullableToggleButtonsThemeDataConverter().toJson(
object.toggleButtonsTheme,
),
'toggleableActiveColor':
const NullableColorConverter().toJson(object.toggleableActiveColor),
'tooltipTheme':
const NullableTooltipThemeDataConverter().toJson(object.tooltipTheme),
'typography':
const NullableTypographyConverter().toJson(object.typography),
'unselectedWidgetColor':
const NullableColorConverter().toJson(object.unselectedWidgetColor),
'visualDensity':
const NullableVisualDensityConverter().toJson(object.visualDensity),
};
}