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
|
|
@ -25,9 +25,9 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
final newLock = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.pleaseChooseAPasscode,
|
||||
message: L10n.of(context)!.pleaseEnter4Digits,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
title: L10n.of(context).pleaseChooseAPasscode,
|
||||
message: L10n.of(context).pleaseEnter4Digits,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
textFields: [
|
||||
DialogTextField(
|
||||
validator: (text) {
|
||||
|
|
@ -35,7 +35,7 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
(text.length == 4 && int.tryParse(text)! >= 0)) {
|
||||
return null;
|
||||
}
|
||||
return L10n.of(context)!.pleaseEnter4Digits;
|
||||
return L10n.of(context).pleaseEnter4Digits;
|
||||
},
|
||||
keyboardType: TextInputType.number,
|
||||
obscureText: true,
|
||||
|
|
@ -54,10 +54,10 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
if (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.warning,
|
||||
message: L10n.of(context)!.deactivateAccountWarning,
|
||||
okLabel: L10n.of(context)!.ok,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
title: L10n.of(context).warning,
|
||||
message: L10n.of(context).deactivateAccountWarning,
|
||||
okLabel: L10n.of(context).ok,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
isDestructiveAction: true,
|
||||
) ==
|
||||
OkCancelResult.cancel) {
|
||||
|
|
@ -67,17 +67,17 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
final mxids = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.confirmMatrixId,
|
||||
title: L10n.of(context).confirmMatrixId,
|
||||
textFields: [
|
||||
DialogTextField(
|
||||
validator: (text) => text == supposedMxid
|
||||
? null
|
||||
: L10n.of(context)!.supposedMxid(supposedMxid),
|
||||
: L10n.of(context).supposedMxid(supposedMxid),
|
||||
),
|
||||
],
|
||||
isDestructiveAction: true,
|
||||
okLabel: L10n.of(context)!.delete,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
okLabel: L10n.of(context).delete,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
);
|
||||
if (mxids == null || mxids.length != 1 || mxids.single != supposedMxid) {
|
||||
return;
|
||||
|
|
@ -85,9 +85,9 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
final input = await showTextInputDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.pleaseEnterYourPassword,
|
||||
okLabel: L10n.of(context)!.ok,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
title: L10n.of(context).pleaseEnterYourPassword,
|
||||
okLabel: L10n.of(context).ok,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
isDestructiveAction: true,
|
||||
textFields: [
|
||||
const DialogTextField(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue