design: Style bottom navigation bar in backgroundcolor
This commit is contained in:
parent
b798b6dd39
commit
ee12843d65
2 changed files with 66 additions and 54 deletions
|
|
@ -60,12 +60,16 @@ abstract class FluffyThemes {
|
||||||
static const Duration animationDuration = Duration(milliseconds: 250);
|
static const Duration animationDuration = Duration(milliseconds: 250);
|
||||||
static const Curve animationCurve = Curves.easeInOut;
|
static const Curve animationCurve = Curves.easeInOut;
|
||||||
|
|
||||||
static ThemeData buildTheme(Brightness brightness, [Color? seed]) =>
|
static ThemeData buildTheme(Brightness brightness, [Color? seed]) {
|
||||||
ThemeData(
|
final colorScheme = ColorScheme.fromSeed(
|
||||||
|
brightness: brightness,
|
||||||
|
seedColor: seed ?? AppConfig.colorSchemeSeed ?? AppConfig.primaryColor,
|
||||||
|
);
|
||||||
|
return ThemeData(
|
||||||
visualDensity: VisualDensity.standard,
|
visualDensity: VisualDensity.standard,
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
colorSchemeSeed: seed ?? AppConfig.colorSchemeSeed,
|
colorScheme: colorScheme,
|
||||||
textTheme: PlatformInfos.isDesktop || PlatformInfos.isWeb
|
textTheme: PlatformInfos.isDesktop || PlatformInfos.isWeb
|
||||||
? brightness == Brightness.light
|
? brightness == Brightness.light
|
||||||
? Typography.material2018().black.merge(fallbackTextTheme)
|
? Typography.material2018().black.merge(fallbackTextTheme)
|
||||||
|
|
@ -94,6 +98,8 @@ abstract class FluffyThemes {
|
||||||
statusBarColor: Colors.transparent,
|
statusBarColor: Colors.transparent,
|
||||||
statusBarIconBrightness: brightness.reversed,
|
statusBarIconBrightness: brightness.reversed,
|
||||||
statusBarBrightness: brightness,
|
statusBarBrightness: brightness,
|
||||||
|
systemNavigationBarIconBrightness: brightness.reversed,
|
||||||
|
systemNavigationBarColor: colorScheme.background,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
textButtonTheme: TextButtonThemeData(
|
textButtonTheme: TextButtonThemeData(
|
||||||
|
|
@ -126,6 +132,7 @@ abstract class FluffyThemes {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extension on Brightness {
|
extension on Brightness {
|
||||||
Brightness get reversed =>
|
Brightness get reversed =>
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,12 @@ class ChatListView extends StatelessWidget {
|
||||||
body: ChatListViewBody(controller),
|
body: ChatListViewBody(controller),
|
||||||
bottomNavigationBar: controller.displayNavigationBar
|
bottomNavigationBar: controller.displayNavigationBar
|
||||||
? NavigationBar(
|
? NavigationBar(
|
||||||
|
elevation: 4,
|
||||||
height: 64,
|
height: 64,
|
||||||
|
shadowColor:
|
||||||
|
Theme.of(context).colorScheme.onBackground,
|
||||||
|
surfaceTintColor:
|
||||||
|
Theme.of(context).colorScheme.background,
|
||||||
selectedIndex: controller.selectedIndex,
|
selectedIndex: controller.selectedIndex,
|
||||||
onDestinationSelected:
|
onDestinationSelected:
|
||||||
controller.onDestinationSelected,
|
controller.onDestinationSelected,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue