Changed BottomNavigationBar to "slim" design type 3
This commit is contained in:
16
lib/app.dart
16
lib/app.dart
@ -9,7 +9,6 @@ import 'package:provider/provider.dart';
|
||||
import 'screen/pages/files/files.dart';
|
||||
import 'screen/pages/more/overhang.dart';
|
||||
import 'screen/pages/talk/chatList.dart';
|
||||
import 'screen/settings/settings.dart';
|
||||
|
||||
import 'package:badges/badges.dart' as badges;
|
||||
|
||||
@ -46,9 +45,9 @@ class _AppState extends State<App> {
|
||||
return PersistentTabView(
|
||||
context,
|
||||
controller: tabController,
|
||||
navBarStyle: NavBarStyle.style3,
|
||||
navBarStyle: NavBarStyle.style6,
|
||||
decoration: const NavBarDecoration(
|
||||
border: Border.symmetric(vertical: BorderSide.none, horizontal: BorderSide(color: Colors.grey, width: 2))
|
||||
border: Border.symmetric(vertical: BorderSide.none, horizontal: BorderSide(color: Colors.grey, width: 1))
|
||||
),
|
||||
screenTransitionAnimation: const ScreenTransitionAnimation(animateTabTransition: true, curve: Curves.ease, duration: Duration(milliseconds: 200)),
|
||||
screens: [
|
||||
@ -69,19 +68,20 @@ class _AppState extends State<App> {
|
||||
inactiveColorPrimary: Theme.of(context).disabledColor,
|
||||
icon: Consumer<ChatListProps>(
|
||||
builder: (context, value, child) {
|
||||
if(value.primaryLoading()) return const SizedBox.shrink();
|
||||
if(value.primaryLoading()) return const Icon(Icons.chat);
|
||||
int messages = value.getRoomsResponse.data.map((e) => e.unreadMessages).reduce((a, b) => a+b);
|
||||
return badges.Badge(
|
||||
showBadge: messages > 0,
|
||||
badgeStyle: const badges.BadgeStyle(
|
||||
badgeColor: Colors.white
|
||||
position: badges.BadgePosition.bottomEnd(),
|
||||
badgeStyle: badges.BadgeStyle(
|
||||
badgeColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
badgeContent: Text("$messages", style: const TextStyle(color: Colors.black)),
|
||||
badgeContent: Text("$messages", style: const TextStyle(color: Colors.white)),
|
||||
child: const Icon(Icons.chat),
|
||||
);
|
||||
},
|
||||
),
|
||||
title: "Talk"
|
||||
title: "Talk",
|
||||
),
|
||||
PersistentBottomNavBarItem(
|
||||
activeColorPrimary: Theme.of(context).primaryColor,
|
||||
|
Reference in New Issue
Block a user