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