refactor: Update to Dart 3.10 with . shorthands

This commit is contained in:
Christian Kußowski 2025-11-30 12:54:06 +01:00
commit 1ea649f01e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
167 changed files with 3351 additions and 3912 deletions

View file

@ -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(),