Replies: 2 comments 10 replies
-
|
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
nank1ro
-
here the code class AppTheme {
static ThemeData dark = ThemeData.dark().copyWith();
static ThemeData light = ThemeData.light().copyWith();
}
class MainApp extends ConsumerWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final appRouter = ref.watch(appRouterProvider);
final currentThemeMode = ref.watch(appThemeModeProvider);
return ShadApp.router(
materialThemeBuilder: (context, theme) {
return theme.brightness == Brightness.light
? AppTheme.light
: AppTheme.dark;
},
themeMode: currentThemeMode,
routerConfig: appRouter,
);
}
} |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @nank1ro ,
I have 2 question:
AppBar
themeex. background-color
inShadThemeData
.flex_color_scheme
package withshadcn-ui
, and if i can how i use it.Thanks,
shadcn_ui version
0.20.3
Beta Was this translation helpful? Give feedback.
All reactions