fix: notify state changed after set state

This commit is contained in:
appflowy
2022-09-20 16:57:51 +08:00
parent ba3f2f3c02
commit ca89fd93f3
2 changed files with 23 additions and 16 deletions

View File

@ -201,9 +201,9 @@ class _FieldNameTextFieldState extends State<_FieldNameTextField> {
void listenOnPopoverChanged(BuildContext context) {
if (_popoverCallback != null) {
widget.popoverMutex.removePopoverStateListener(_popoverCallback!);
widget.popoverMutex.removePopoverListener(_popoverCallback!);
}
_popoverCallback = widget.popoverMutex.listenOnPopoverStateChanged(() {
_popoverCallback = widget.popoverMutex.listenOnPopoverChanged(() {
if (focusNode.hasFocus) {
final node = FocusScope.of(context);
node.unfocus();