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

@ -35,10 +35,10 @@ class DevicesSettingsController extends State<DevicesSettings> {
void removeDevicesAction(List<Device> devices) async {
if (await showOkCancelAlertDialog(
context: context,
title: L10n.of(context)!.areYouSure,
okLabel: L10n.of(context)!.yes,
cancelLabel: L10n.of(context)!.cancel,
message: L10n.of(context)!.removeDevicesDescription,
title: L10n.of(context).areYouSure,
okLabel: L10n.of(context).yes,
cancelLabel: L10n.of(context).cancel,
message: L10n.of(context).removeDevicesDescription,
) ==
OkCancelResult.cancel) return;
final matrix = Matrix.of(context);
@ -70,9 +70,9 @@ class DevicesSettingsController extends State<DevicesSettings> {
void renameDeviceAction(Device device) async {
final displayName = await showTextInputDialog(
context: context,
title: L10n.of(context)!.changeDeviceName,
okLabel: L10n.of(context)!.ok,
cancelLabel: L10n.of(context)!.cancel,
title: L10n.of(context).changeDeviceName,
okLabel: L10n.of(context).ok,
cancelLabel: L10n.of(context).cancel,
textFields: [
DialogTextField(
hintText: device.displayName,
@ -94,10 +94,10 @@ class DevicesSettingsController extends State<DevicesSettings> {
void verifyDeviceAction(Device device) async {
final consent = await showOkCancelAlertDialog(
context: context,
title: L10n.of(context)!.verifyOtherDevice,
message: L10n.of(context)!.verifyOtherDeviceDescription,
okLabel: L10n.of(context)!.ok,
cancelLabel: L10n.of(context)!.cancel,
title: L10n.of(context).verifyOtherDevice,
message: L10n.of(context).verifyOtherDeviceDescription,
okLabel: L10n.of(context).ok,
cancelLabel: L10n.of(context).cancel,
fullyCapitalizedForMaterial: false,
);
if (consent != OkCancelResult.ok) return;