remove focus node that is not needed thanks to flutter being smart
This commit is contained in:
parent
14b7813243
commit
6f271ffc91
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue