Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FocusScopeNode Error #30

Closed
antoniopetricc opened this issue Aug 26, 2021 · 4 comments
Closed

FocusScopeNode Error #30

antoniopetricc opened this issue Aug 26, 2021 · 4 comments

Comments

@antoniopetricc
Copy link

FocusScopeNode FocusScopeNode#ea86b(_FlashState Focus Scope [PRIMARY FOCUS])(context: FocusScope, PRIMARY FOCUS) must be a child of FocusScopeNode#6ff27(Navigator Scope)(context: FocusScope, focusedChildren: [FocusScopeNode#bac68(_ModalScopeState Focus Scope)]) to set it as first focus.
'package:flutter/src/widgets/focus_manager.dart':
Failed assertion: line 1272 pos 12: 'scope.ancestors.contains(this)'

@anthonysette
Copy link

How did you solve this?

@antoniopetricc
Copy link
Author

FocusScope.of(context).requestFocus(FocusNode());

@anthonysette
Copy link

Where did you call this though? Does the issue not relate to the flash snackbars?

@mkPytsNortal
Copy link

For those who are trying to add a text field into Flash, please do not use persistent: true, in this case Flash it is not using navigator overlay and during the typing into the text field didUpdateWidget is trying to make magic with FocusNodeScopes or Navigator FocusScopeNode and Flash's state FocusScopeNode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants