getTheme method
Implementation
ColorScheme getTheme(CloudThemeModes themeMode) {
Map<String, String> colors = getColorFromRemoteConfig(themeMode);
// Create a ColorScheme using the retrieved color values
return ColorScheme(
brightness: themeMode == CloudThemeModes.dark
? Brightness.dark
: Brightness.light,
primary: hexToColor(colors['${themeMode.name}_primary']!),
secondary: hexToColor(colors['${themeMode.name}_secondary']!),
surface: hexToColor(colors['${themeMode.name}_surface']!),
error: hexToColor(colors['${themeMode.name}_error']!),
onPrimary: hexToColor(colors['${themeMode.name}_onPrimary']!),
onSecondary: hexToColor(colors['${themeMode.name}_onSecondary']!),
onSurface: hexToColor(colors['${themeMode.name}_onSurface']!),
onError: hexToColor(colors['${themeMode.name}_onError']!),
);
}