Skip to content

Commit 8a40655

Browse files
committed
Add init and dispose focuseNode keyboard controls
1 parent 7416359 commit 8a40655

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/src/material/material_desktop_controls.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class _MaterialDesktopControlsState extends State<MaterialDesktopControls>
5858
@override
5959
void initState() {
6060
super.initState();
61+
_focusNode = FocusNode();
6162
notifier = Provider.of<PlayerNotifier>(context, listen: false);
6263
}
6364

@@ -139,6 +140,7 @@ class _MaterialDesktopControlsState extends State<MaterialDesktopControls>
139140
}
140141

141142
void _dispose() {
143+
_focusNode.dispose();
142144
controller.removeListener(_updateState);
143145
_hideTimer?.cancel();
144146
_initTimer?.cancel();

0 commit comments

Comments
 (0)