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
|
|
@ -26,7 +26,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: const Center(child: BackButton()),
|
||||
title: Text(L10n.of(context)!.customEmojisAndStickers),
|
||||
title: Text(L10n.of(context).customEmojisAndStickers),
|
||||
actions: [
|
||||
PopupMenuButton<PopupMenuEmojiActions>(
|
||||
onSelected: (value) {
|
||||
|
|
@ -43,11 +43,11 @@ class EmotesSettingsView extends StatelessWidget {
|
|||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: PopupMenuEmojiActions.import,
|
||||
child: Text(L10n.of(context)!.importFromZipFile),
|
||||
child: Text(L10n.of(context).importFromZipFile),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: PopupMenuEmojiActions.export,
|
||||
child: Text(L10n.of(context)!.exportEmotePack),
|
||||
child: Text(L10n.of(context).exportEmotePack),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -83,7 +83,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||
minLines: 1,
|
||||
maxLines: 1,
|
||||
decoration: InputDecoration(
|
||||
hintText: L10n.of(context)!.emoteShortcode,
|
||||
hintText: L10n.of(context).emoteShortcode,
|
||||
prefixText: ': ',
|
||||
suffixText: ':',
|
||||
prefixStyle: TextStyle(
|
||||
|
|
@ -114,7 +114,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||
),
|
||||
if (controller.room != null)
|
||||
SwitchListTile.adaptive(
|
||||
title: Text(L10n.of(context)!.enableEmotesGlobally),
|
||||
title: Text(L10n.of(context).enableEmotesGlobally),
|
||||
value: controller.isGloballyActive(client),
|
||||
onChanged: controller.setIsGloballyActive,
|
||||
),
|
||||
|
|
@ -125,7 +125,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
L10n.of(context)!.noEmotesFound,
|
||||
L10n.of(context).noEmotesFound,
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
),
|
||||
|
|
@ -186,7 +186,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||
minLines: 1,
|
||||
maxLines: 1,
|
||||
decoration: InputDecoration(
|
||||
hintText: L10n.of(context)!.emoteShortcode,
|
||||
hintText: L10n.of(context).emoteShortcode,
|
||||
prefixText: ': ',
|
||||
suffixText: ':',
|
||||
prefixStyle: TextStyle(
|
||||
|
|
@ -269,7 +269,7 @@ class _ImagePickerState extends State<_ImagePicker> {
|
|||
if (widget.controller.value == null) {
|
||||
return ElevatedButton(
|
||||
onPressed: () => widget.onPressed(widget.controller),
|
||||
child: Text(L10n.of(context)!.pickImage),
|
||||
child: Text(L10n.of(context).pickImage),
|
||||
);
|
||||
} else {
|
||||
return _EmoteImage(widget.controller.value!.url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue