Update lib/widgets/editor/editor_toolbar.dart
Co-authored-by: Marcin Wojnarowski <xmarcinmarcin@gmail.com>
This commit is contained in:
parent
b39d6b06d7
commit
90553794b2
|
@ -54,14 +54,7 @@ class EditorToolbar extends HookWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final visible = useState(editorFocusNode.hasFocus);
|
||||
useEffect(() {
|
||||
editorFocusNode.addListener(() {
|
||||
visible.value = editorFocusNode.hasFocus;
|
||||
});
|
||||
|
||||
return;
|
||||
}, [editorFocusNode]);
|
||||
final visible = useListenable(editorFocusNode).hasFocus;
|
||||
|
||||
return MobxProvider(
|
||||
create: (context) => store,
|
||||
|
|
Loading…
Reference in New Issue