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
|
|
@ -52,7 +52,7 @@ class NewSpaceController extends State<NewSpace> {
|
|||
});
|
||||
if (nameController.text.isEmpty) {
|
||||
setState(() {
|
||||
nameError = L10n.of(context)!.pleaseChoose;
|
||||
nameError = L10n.of(context).pleaseChoose;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class NewSpaceView extends StatelessWidget {
|
|||
final avatar = controller.avatar;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10n.of(context)!.createNewSpace),
|
||||
title: Text(L10n.of(context).createNewSpace),
|
||||
),
|
||||
body: MaxWidthBody(
|
||||
child: Column(
|
||||
|
|
@ -51,7 +51,7 @@ class NewSpaceView extends StatelessWidget {
|
|||
readOnly: controller.loading,
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: const Icon(Icons.people_outlined),
|
||||
labelText: L10n.of(context)!.spaceName,
|
||||
labelText: L10n.of(context).spaceName,
|
||||
errorText: controller.nameError,
|
||||
),
|
||||
),
|
||||
|
|
@ -59,7 +59,7 @@ class NewSpaceView extends StatelessWidget {
|
|||
const SizedBox(height: 16),
|
||||
SwitchListTile.adaptive(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 32),
|
||||
title: Text(L10n.of(context)!.spaceIsPublic),
|
||||
title: Text(L10n.of(context).spaceIsPublic),
|
||||
value: controller.publicGroup,
|
||||
onChanged: controller.setPublicGroup,
|
||||
),
|
||||
|
|
@ -69,7 +69,7 @@ class NewSpaceView extends StatelessWidget {
|
|||
padding: EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Icon(Icons.info_outlined),
|
||||
),
|
||||
subtitle: Text(L10n.of(context)!.newSpaceDescription),
|
||||
subtitle: Text(L10n.of(context).newSpaceDescription),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
|
|
@ -80,7 +80,7 @@ class NewSpaceView extends StatelessWidget {
|
|||
controller.loading ? null : controller.submitAction,
|
||||
child: controller.loading
|
||||
? const LinearProgressIndicator()
|
||||
: Text(L10n.of(context)!.createNewSpace),
|
||||
: Text(L10n.of(context).createNewSpace),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue