updated project style guidelines

This commit is contained in:
2024-04-03 19:18:17 +02:00
parent 27618f4404
commit 4c7f53e309
185 changed files with 505 additions and 873 deletions

View File

@ -94,8 +94,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
}
@override
Widget build(BuildContext context) {
return PersistentTabView(
Widget build(BuildContext context) => PersistentTabView(
controller: App.bottomNavigator,
navBarOverlap: const NavBarOverlap.none(),
backgroundColor: Theme.of(context).colorScheme.primary,
@ -119,7 +118,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
icon: Consumer<ChatListProps>(
builder: (context, value, child) {
if(value.primaryLoading()) return const Icon(Icons.chat);
int messages = value.getRoomsResponse.data.map((e) => e.unreadMessages).reduce((a, b) => a+b);
var messages = value.getRoomsResponse.data.map((e) => e.unreadMessages).reduce((a, b) => a+b);
return badges.Badge(
showBadge: messages > 0,
position: badges.BadgePosition.topEnd(top: -3, end: -3),
@ -164,7 +163,6 @@ class _AppState extends State<App> with WidgetsBindingObserver {
),
),
);
}
@override
void dispose() {
@ -173,4 +171,4 @@ class _AppState extends State<App> with WidgetsBindingObserver {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
}
}