refactor: Update to Dart 3.10 with . shorthands
This commit is contained in:
parent
75a37f3f7c
commit
1ea649f01e
167 changed files with 3351 additions and 3912 deletions
|
|
@ -21,9 +21,7 @@ class UnreadRoomsBadge extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
final unreadCount = Matrix.of(context)
|
||||
.client
|
||||
.rooms
|
||||
final unreadCount = Matrix.of(context).client.rooms
|
||||
.where(filter)
|
||||
.where((r) => (r.isUnread || r.membership == Membership.invite))
|
||||
.length;
|
||||
|
|
@ -31,17 +29,11 @@ class UnreadRoomsBadge extends StatelessWidget {
|
|||
badgeStyle: b.BadgeStyle(
|
||||
badgeColor: theme.colorScheme.primary,
|
||||
elevation: 4,
|
||||
borderSide: BorderSide(
|
||||
color: theme.colorScheme.surface,
|
||||
width: 2,
|
||||
),
|
||||
borderSide: BorderSide(color: theme.colorScheme.surface, width: 2),
|
||||
),
|
||||
badgeContent: Text(
|
||||
unreadCount.toString(),
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.onPrimary,
|
||||
fontSize: 12,
|
||||
),
|
||||
style: TextStyle(color: theme.colorScheme.onPrimary, fontSize: 12),
|
||||
),
|
||||
showBadge: unreadCount != 0,
|
||||
badgeAnimation: const b.BadgeAnimation.scale(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue