refactor: Migrate to null safety
This commit is contained in:
parent
5269f04a99
commit
55f0300f9f
163 changed files with 1759 additions and 1903 deletions
|
|
@ -9,7 +9,7 @@ import 'package:fluffychat/pages/new_space/new_space_view.dart';
|
|||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
|
||||
class NewSpace extends StatefulWidget {
|
||||
const NewSpace({Key key}) : super(key: key);
|
||||
const NewSpace({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
NewSpaceController createState() => NewSpaceController();
|
||||
|
|
@ -38,7 +38,7 @@ class NewSpaceController extends State<NewSpace> {
|
|||
),
|
||||
);
|
||||
if (roomID.error == null) {
|
||||
VRouter.of(context).toSegments(['rooms', roomID.result, 'details']);
|
||||
VRouter.of(context).toSegments(['rooms', roomID.result!, 'details']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ import 'new_space.dart';
|
|||
class NewSpaceView extends StatelessWidget {
|
||||
final NewSpaceController controller;
|
||||
|
||||
const NewSpaceView(this.controller, {Key key}) : super(key: key);
|
||||
const NewSpaceView(this.controller, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10n.of(context).createNewSpace),
|
||||
title: Text(L10n.of(context)!.createNewSpace),
|
||||
),
|
||||
body: MaxWidthBody(
|
||||
child: Column(
|
||||
|
|
@ -29,13 +29,13 @@ class NewSpaceView extends StatelessWidget {
|
|||
textInputAction: TextInputAction.go,
|
||||
onSubmitted: controller.submitAction,
|
||||
decoration: InputDecoration(
|
||||
labelText: L10n.of(context).spaceName,
|
||||
labelText: L10n.of(context)!.spaceName,
|
||||
prefixIcon: const Icon(Icons.people_outlined),
|
||||
hintText: L10n.of(context).enterASpacepName),
|
||||
hintText: L10n.of(context)!.enterASpacepName),
|
||||
),
|
||||
),
|
||||
SwitchListTile.adaptive(
|
||||
title: Text(L10n.of(context).spaceIsPublic),
|
||||
title: Text(L10n.of(context)!.spaceIsPublic),
|
||||
value: controller.publicGroup,
|
||||
onChanged: controller.setPublicGroup,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue