Theme Mode #3
This commit is contained in:
27
lib/app.dart
27
lib/app.dart
@@ -82,31 +82,6 @@ class _KMobileState extends State<KMobile> {
|
||||
BlocProvider<ThemeCubit>(create: (_) => ThemeCubit()),
|
||||
BlocProvider<ThemeModeCubit>(create: (_) => ThemeModeCubit()),
|
||||
],
|
||||
// child: BlocBuilder<ThemeCubit, ThemeState>(
|
||||
// builder: (context, themeState) {
|
||||
// return MaterialApp(
|
||||
// debugShowCheckedModeBanner: false,
|
||||
// locale: _locale ?? const Locale('en'),
|
||||
// supportedLocales: const [
|
||||
// Locale('en'),
|
||||
// Locale('hi'),
|
||||
// ],
|
||||
// localizationsDelegates: const [
|
||||
// AppLocalizations.delegate,
|
||||
// GlobalMaterialLocalizations.delegate,
|
||||
// GlobalWidgetsLocalizations.delegate,
|
||||
// GlobalCupertinoLocalizations.delegate,
|
||||
// ],
|
||||
// title: 'kMobile',
|
||||
// theme: themeState.getThemeData(),
|
||||
// //darkTheme: themeState.getThemeData(),
|
||||
// themeMode: ThemeMode.light,
|
||||
// onGenerateRoute: AppRoutes.generateRoute,
|
||||
// initialRoute: AppRoutes.splash,
|
||||
// home: showSplash ? const SplashScreen() : const AuthGate(),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
child: BlocBuilder<ThemeCubit, ThemeState>(
|
||||
builder: (context, themeState) {
|
||||
return BlocBuilder<ThemeModeCubit, ThemeModeState>(
|
||||
@@ -370,7 +345,7 @@ class _NavigationScaffoldState extends State<NavigationScaffold> {
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
selectedItemColor: Theme.of(context).primaryColor,
|
||||
unselectedItemColor: Colors.black54,
|
||||
unselectedItemColor: Theme.of(context).colorScheme.onSurface.withOpacity(0.6),
|
||||
onTap: (index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
|
Reference in New Issue
Block a user