design: Style bottom navigation bar in backgroundcolor

pull/465/head
krille-chan 2 years ago
parent b798b6dd39
commit ee12843d65
No known key found for this signature in database

@ -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(
@ -125,6 +131,7 @@ abstract class FluffyThemes {
),
),
);
}
}
extension on Brightness {

@ -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…
Cancel
Save