toJson method

Map<String, dynamic> toJson()

Converts the ZdsThemeData instance to a JSON map.

Implementation

Map<String, dynamic> toJson() {
  return {
    'identifier': themeData.identifier,
    'themeMode': _themeModeToString(themeMode),
    'fontFamily': themeData.fontFamily,
    'adjustAccessibility': adjustAccessibility,
    'contrast': _contrastToString(contrast),
    'light': {
      'appBarStyle': _zetaAppBarStyleToString(lightAppBarStyle),
      ..._lightColors.toJson(),
    },
    'dark': {
      'appBarStyle': _zetaAppBarStyleToString(darkAppBarStyle),
      ..._darkColors.toJson(),
    },
  };
}