refactor: Update badge
This commit is contained in:
parent
7dd8f7c1f5
commit
3b12d8ab84
3 changed files with 13 additions and 12 deletions
|
|
@ -33,7 +33,14 @@ class UnreadRoomsBadge extends StatelessWidget {
|
||||||
.where((r) => (r.isUnread || r.membership == Membership.invite))
|
.where((r) => (r.isUnread || r.membership == Membership.invite))
|
||||||
.length;
|
.length;
|
||||||
return b.Badge(
|
return b.Badge(
|
||||||
alignment: Alignment.bottomRight,
|
badgeStyle: b.BadgeStyle(
|
||||||
|
badgeColor: Theme.of(context).colorScheme.primary,
|
||||||
|
elevation: 4,
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Theme.of(context).colorScheme.background,
|
||||||
|
width: 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
badgeContent: Text(
|
badgeContent: Text(
|
||||||
unreadCount.toString(),
|
unreadCount.toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -42,14 +49,8 @@ class UnreadRoomsBadge extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
showBadge: unreadCount != 0,
|
showBadge: unreadCount != 0,
|
||||||
animationType: b.BadgeAnimationType.scale,
|
badgeAnimation: const b.BadgeAnimation.scale(),
|
||||||
badgeColor: Theme.of(context).colorScheme.primary,
|
position: badgePosition ?? b.BadgePosition.bottomEnd(),
|
||||||
position: badgePosition,
|
|
||||||
elevation: 4,
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).colorScheme.background,
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: badges
|
name: badges
|
||||||
sha256: "727580d938b7a1ff47ea42df730d581415606b4224cfa708671c10287f8d3fe6"
|
sha256: "6e7f3ec561ec08f47f912cfe349d4a1707afdc8dda271e17b046aa6d42c89e77"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "3.1.1"
|
||||||
base58check:
|
base58check:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ dependencies:
|
||||||
adaptive_dialog: ^1.9.0-x-macos-beta.1
|
adaptive_dialog: ^1.9.0-x-macos-beta.1
|
||||||
animations: ^2.0.7
|
animations: ^2.0.7
|
||||||
archive: ^3.3.7
|
archive: ^3.3.7
|
||||||
badges: ^2.0.3
|
badges: ^3.1.1
|
||||||
blurhash_dart: ^1.1.0
|
blurhash_dart: ^1.1.0
|
||||||
callkeep: ^0.3.2
|
callkeep: ^0.3.2
|
||||||
chewie: ^1.3.6
|
chewie: ^1.3.6
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue