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
|
|
@ -239,8 +239,8 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
|
||||
void initLoadingDialog() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
LoadingDialog.defaultTitle = L10n.of(context)!.loadingPleaseWait;
|
||||
LoadingDialog.defaultBackLabel = L10n.of(context)!.close;
|
||||
LoadingDialog.defaultTitle = L10n.of(context).loadingPleaseWait;
|
||||
LoadingDialog.defaultBackLabel = L10n.of(context).close;
|
||||
LoadingDialog.defaultOnError =
|
||||
(e) => (e as Object?)!.toLocalizedString(context);
|
||||
});
|
||||
|
|
@ -312,7 +312,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
context,
|
||||
).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(L10n.of(context)!.oneClientLoggedOut),
|
||||
content: Text(L10n.of(context).oneClientLoggedOut),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -371,13 +371,12 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
context: FluffyChatApp
|
||||
.router.routerDelegate.navigatorKey.currentContext ??
|
||||
context,
|
||||
title: L10n.of(context)!.pushNotificationsNotAvailable,
|
||||
title: L10n.of(context).pushNotificationsNotAvailable,
|
||||
message: errorMsg,
|
||||
fullyCapitalizedForMaterial: false,
|
||||
okLabel: link == null
|
||||
? L10n.of(context)!.ok
|
||||
: L10n.of(context)!.learnMore,
|
||||
cancelLabel: L10n.of(context)!.doNotShowAgain,
|
||||
okLabel:
|
||||
link == null ? L10n.of(context).ok : L10n.of(context).learnMore,
|
||||
cancelLabel: L10n.of(context).doNotShowAgain,
|
||||
);
|
||||
if (result == OkCancelResult.ok && link != null) {
|
||||
launchUrlString(
|
||||
|
|
@ -495,8 +494,8 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
final response = await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
isDestructiveAction: true,
|
||||
title: L10n.of(context)!.dehydrate,
|
||||
message: L10n.of(context)!.dehydrateWarning,
|
||||
title: L10n.of(context).dehydrate,
|
||||
message: L10n.of(context).dehydrateWarning,
|
||||
);
|
||||
if (response != OkCancelResult.ok) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue