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 Curve animationCurve = Curves.easeInOut;
|
||||
|
||||
static ThemeData buildTheme(Brightness brightness, [Color? seed]) =>
|
||||
ThemeData(
|
||||
static ThemeData buildTheme(Brightness brightness, [Color? seed]) {
|
||||
final colorScheme = ColorScheme.fromSeed(
|
||||
brightness: brightness,
|
||||
seedColor: seed ?? AppConfig.colorSchemeSeed ?? AppConfig.primaryColor,
|
||||
);
|
||||
return ThemeData(
|
||||
visualDensity: VisualDensity.standard,
|
||||
useMaterial3: true,
|
||||
brightness: brightness,
|
||||
colorSchemeSeed: seed ?? AppConfig.colorSchemeSeed,
|
||||
colorScheme: colorScheme,
|
||||
textTheme: PlatformInfos.isDesktop || PlatformInfos.isWeb
|
||||
? brightness == Brightness.light
|
||||
? Typography.material2018().black.merge(fallbackTextTheme)
|
||||
|
|
@ -94,6 +98,8 @@ abstract class FluffyThemes {
|
|||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: brightness.reversed,
|
||||
statusBarBrightness: brightness,
|
||||
systemNavigationBarIconBrightness: brightness.reversed,
|
||||
systemNavigationBarColor: colorScheme.background,
|
||||
),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
|
|
@ -126,6 +132,7 @@ abstract class FluffyThemes {
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension on Brightness {
|
||||
Brightness get reversed =>
|
||||
|
|
|
|||
|
|
@ -176,7 +176,12 @@ class ChatListView extends StatelessWidget {
|
|||
body: ChatListViewBody(controller),
|
||||
bottomNavigationBar: controller.displayNavigationBar
|
||||
? NavigationBar(
|
||||
elevation: 4,
|
||||
height: 64,
|
||||
shadowColor:
|
||||
Theme.of(context).colorScheme.onBackground,
|
||||
surfaceTintColor:
|
||||
Theme.of(context).colorScheme.background,
|
||||
selectedIndex: controller.selectedIndex,
|
||||
onDestinationSelected:
|
||||
controller.onDestinationSelected,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue