Open WeighingDog opened 5 months ago
Hi. I need to wrap PlatformTheme inside a theme Consumer to change primary color of theme based on button press. Is it correct? It's like PlatformTheme.of(context)?.themeMode assegnation does not work properly.
Consumer2<AppThemeData, AppLanguageProvider>( builder: (context, theme, locale, child) => PlatformTheme( themeMode: initialThemeMode, materialLightTheme: AppThemeData.materialLightTheme, materialDarkTheme: AppThemeData.materialDarkTheme, cupertinoLightTheme: theme.cupertinoCustomLightTheme, cupertinoDarkTheme: AppThemeData.cupertinoDarkTheme, matchCupertinoSystemChromeBrightness: true, onThemeModeChanged: (themeMode) { print(themeMode); theme.setThemeMode(themeMode); },
Hi. I need to wrap PlatformTheme inside a theme Consumer to change primary color of theme based on button press. Is it correct? It's like PlatformTheme.of(context)?.themeMode assegnation does not work properly.
Consumer2<AppThemeData, AppLanguageProvider>( builder: (context, theme, locale, child) => PlatformTheme( themeMode: initialThemeMode, materialLightTheme: AppThemeData.materialLightTheme, materialDarkTheme: AppThemeData.materialDarkTheme, cupertinoLightTheme: theme.cupertinoCustomLightTheme, cupertinoDarkTheme: AppThemeData.cupertinoDarkTheme, matchCupertinoSystemChromeBrightness: true, onThemeModeChanged: (themeMode) { print(themeMode); theme.setThemeMode(themeMode); },