refactor: Use non nullable localizations builder and lazy load on web
This commit is contained in:
parent
8cedd2a45a
commit
0d4b7d67cc
111 changed files with 879 additions and 883 deletions
|
|
@ -36,9 +36,9 @@ class SettingsController extends State<Settings> {
|
|||
final input = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.editDisplayname,
|
||||
okLabel: L10n.of(context)!.ok,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
title: L10n.of(context).editDisplayname,
|
||||
okLabel: L10n.of(context).ok,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
textFields: [
|
||||
DialogTextField(
|
||||
initialText: profile?.displayName ??
|
||||
|
|
@ -63,11 +63,11 @@ class SettingsController extends State<Settings> {
|
|||
if (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.areYouSureYouWantToLogout,
|
||||
message: L10n.of(context)!.noBackupWarning,
|
||||
title: L10n.of(context).areYouSureYouWantToLogout,
|
||||
message: L10n.of(context).noBackupWarning,
|
||||
isDestructiveAction: noBackup,
|
||||
okLabel: L10n.of(context)!.logout,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
okLabel: L10n.of(context).logout,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
) ==
|
||||
OkCancelResult.cancel) {
|
||||
return;
|
||||
|
|
@ -85,19 +85,19 @@ class SettingsController extends State<Settings> {
|
|||
if (PlatformInfos.isMobile)
|
||||
SheetAction(
|
||||
key: AvatarAction.camera,
|
||||
label: L10n.of(context)!.openCamera,
|
||||
label: L10n.of(context).openCamera,
|
||||
isDefaultAction: true,
|
||||
icon: Icons.camera_alt_outlined,
|
||||
),
|
||||
SheetAction(
|
||||
key: AvatarAction.file,
|
||||
label: L10n.of(context)!.openGallery,
|
||||
label: L10n.of(context).openGallery,
|
||||
icon: Icons.photo_outlined,
|
||||
),
|
||||
if (profile?.avatarUrl != null)
|
||||
SheetAction(
|
||||
key: AvatarAction.remove,
|
||||
label: L10n.of(context)!.removeYourAvatar,
|
||||
label: L10n.of(context).removeYourAvatar,
|
||||
isDestructiveAction: true,
|
||||
icon: Icons.delete_outlined,
|
||||
),
|
||||
|
|
@ -106,7 +106,7 @@ class SettingsController extends State<Settings> {
|
|||
? actions.single.key
|
||||
: await showModalActionSheet<AvatarAction>(
|
||||
context: context,
|
||||
title: L10n.of(context)!.changeYourAvatar,
|
||||
title: L10n.of(context).changeYourAvatar,
|
||||
actions: actions,
|
||||
);
|
||||
if (action == null) return;
|
||||
|
|
@ -189,9 +189,9 @@ class SettingsController extends State<Settings> {
|
|||
if (showChatBackupBanner != true) {
|
||||
showOkAlertDialog(
|
||||
context: context,
|
||||
title: L10n.of(context)!.chatBackup,
|
||||
message: L10n.of(context)!.onlineKeyBackupEnabled,
|
||||
okLabel: L10n.of(context)!.close,
|
||||
title: L10n.of(context).chatBackup,
|
||||
message: L10n.of(context).onlineKeyBackupEnabled,
|
||||
okLabel: L10n.of(context).close,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue