refactor: Use non nullable localizations builder and lazy load on web

This commit is contained in:
krille-chan 2024-10-06 08:35:37 +02:00
commit 0d4b7d67cc
No known key found for this signature in database
111 changed files with 879 additions and 883 deletions

View file

@ -76,7 +76,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
),
);
if (!query.chunk.any(_testRoom)) {
throw (L10n.of(outerContext)!.noRoomsFound);
throw (L10n.of(outerContext).noRoomsFound);
}
return query.chunk.firstWhere(_testRoom);
}
@ -95,7 +95,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
leading: IconButton(
icon: const Icon(Icons.arrow_downward_outlined),
onPressed: Navigator.of(context, rootNavigator: false).pop,
tooltip: L10n.of(context)!.close,
tooltip: L10n.of(context).close,
),
actions: [
Padding(
@ -170,7 +170,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
foregroundColor: theme.colorScheme.onSurface,
),
label: Text(
L10n.of(context)!.countParticipants(
L10n.of(context).countParticipants(
profile?.numJoinedMembers ?? 0,
),
maxLines: 1,
@ -192,10 +192,10 @@ class PublicRoomBottomSheet extends StatelessWidget {
.client
.getRoomById(chunk!.roomId) ==
null
? L10n.of(context)!.knock
? L10n.of(context).knock
: chunk?.roomType == 'm.space'
? L10n.of(context)!.joinSpace
: L10n.of(context)!.joinRoom,
? L10n.of(context).joinSpace
: L10n.of(context).joinRoom,
),
icon: const Icon(Icons.navigate_next),
),