remove focus node that is not needed thanks to flutter being smart

This commit is contained in:
Filip Krawczyk 2022-06-28 00:41:00 +02:00
parent 14b7813243
commit 6f271ffc91
1 changed files with 0 additions and 3 deletions

View File

@ -31,7 +31,6 @@ class CreatePostPage extends HookWidget {
);
final titleFocusNode = useFocusNode();
final bodyFocusNode = useFocusNode();
handleSubmit(Jwt token) async {
if (formKey.currentState!.validate()) {
@ -47,7 +46,6 @@ class CreatePostPage extends HookWidget {
textCapitalization: TextCapitalization.sentences,
textInputAction: TextInputAction.next,
validator: Validators.required(L10n.of(context).required_field),
onFieldSubmitted: (_) => bodyFocusNode.requestFocus(),
onChanged: (title) => store.title = title,
minLines: 1,
maxLines: 2,
@ -61,7 +59,6 @@ class CreatePostPage extends HookWidget {
final body = ObserverBuilder<CreatePostStore>(
builder: (context, store) => Editor(
controller: bodyController,
focusNode: bodyFocusNode,
onChanged: (body) => store.body = body,
labelText: L10n.of(context).body,
instanceHost: store.instanceHost,