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
|
|
@ -39,7 +39,7 @@ class UrlLauncher {
|
|||
if (uri == null) {
|
||||
// we can't open this thing
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(L10n.of(context)!.cantOpenUri(url!))),
|
||||
SnackBar(content: Text(L10n.of(context).cantOpenUri(url!))),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -49,10 +49,10 @@ class UrlLauncher {
|
|||
// that the user can see the actual url before opening the browser.
|
||||
final consent = await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: L10n.of(context)!.openLinkInBrowser,
|
||||
title: L10n.of(context).openLinkInBrowser,
|
||||
message: url,
|
||||
okLabel: L10n.of(context)!.yes,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
okLabel: L10n.of(context).yes,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
);
|
||||
if (consent != OkCancelResult.ok) return;
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ class UrlLauncher {
|
|||
}
|
||||
if (uri.host.isEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(L10n.of(context)!.cantOpenUri(url!))),
|
||||
SnackBar(content: Text(L10n.of(context).cantOpenUri(url!))),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue