mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-25 08:16:06 +00:00
Bottom nav bar color improvements
This commit is contained in:
parent
2816448ee2
commit
3875f161ca
2 changed files with 14 additions and 2 deletions
|
@ -24,6 +24,9 @@ ThemeData lightTheme(ColorScheme? dynamicColorScheme) => ThemeData(
|
||||||
color: Colors.black
|
color: Colors.black
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
|
indicatorColor: dynamicColorScheme != null ? dynamicColorScheme.primaryContainer : adguardGreenColor,
|
||||||
|
),
|
||||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor
|
backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor
|
||||||
|
@ -76,7 +79,7 @@ ThemeData darkTheme(ColorScheme? dynamicColorScheme) => ThemeData(
|
||||||
scaffoldBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.background :const Color.fromRGBO(18, 18, 18, 1),
|
scaffoldBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.background :const Color.fromRGBO(18, 18, 18, 1),
|
||||||
dialogBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.background : const Color.fromRGBO(44, 44, 44, 1),
|
dialogBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.background : const Color.fromRGBO(44, 44, 44, 1),
|
||||||
navigationBarTheme: NavigationBarThemeData(
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
indicatorColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor,
|
indicatorColor: dynamicColorScheme != null ? dynamicColorScheme.primaryContainer : adguardGreenColor,
|
||||||
),
|
),
|
||||||
snackBarTheme: SnackBarThemeData(
|
snackBarTheme: SnackBarThemeData(
|
||||||
contentTextStyle: const TextStyle(
|
contentTextStyle: const TextStyle(
|
||||||
|
|
|
@ -50,7 +50,16 @@ class BottomNavBar extends StatelessWidget {
|
||||||
return NavigationBar(
|
return NavigationBar(
|
||||||
selectedIndex: appConfigProvider.selectedScreen,
|
selectedIndex: appConfigProvider.selectedScreen,
|
||||||
destinations: screens.map((screen) => NavigationDestination(
|
destinations: screens.map((screen) => NavigationDestination(
|
||||||
icon: Icon(screen.icon),
|
icon: Icon(
|
||||||
|
screen.icon,
|
||||||
|
color: screens.indexOf(screen) == appConfigProvider.selectedScreen
|
||||||
|
? Theme.of(context).navigationBarTheme.indicatorColor!.computeLuminance() > 0.5 ?
|
||||||
|
appConfigProvider.useDynamicColor == true
|
||||||
|
? Theme.of(context).primaryColor
|
||||||
|
: Colors.black
|
||||||
|
: Colors.white
|
||||||
|
: null,
|
||||||
|
),
|
||||||
label: translatedName(screen.name)
|
label: translatedName(screen.name)
|
||||||
)).toList(),
|
)).toList(),
|
||||||
onDestinationSelected: (value) {
|
onDestinationSelected: (value) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue