From f21c6b7c8c0d3281d6582c502c70f0631b82dc2e Mon Sep 17 00:00:00 2001 From: Filip Krawczyk Date: Tue, 28 Jun 2022 00:41:00 +0200 Subject: [PATCH] remove focus node that is not needed thanks to flutter being smart --- lib/pages/create_post/create_post.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/pages/create_post/create_post.dart b/lib/pages/create_post/create_post.dart index c215b69..0ffc7a2 100644 --- a/lib/pages/create_post/create_post.dart +++ b/lib/pages/create_post/create_post.dart @@ -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( builder: (context, store) => Editor( controller: bodyController, - focusNode: bodyFocusNode, onChanged: (body) => store.body = body, labelText: L10n.of(context).body, instanceHost: store.instanceHost,