How to implement KeyboardListener as a custom widget?

Custom Code

FF doesn't natively have a keyboard listener widget. I want to add a listener for the right and left arrows that will trigger a PageView swipe on web browser.

I know I have to use the KeyboardListener class, but I need to accept a child container as parameter so I can set the FocusNode parameter of the KeyboardListener class. But I don't know how to provide child widget as parameter to custom widget.

Related dicussions
1. Trigger actions from keyboard (flutterflow.io)
2. How to pass a widget as child parameter to a Custom Widget (flutterflow.io)

What have you tried so far?

I noticed, that if you set the parameter type to 'icon', then collapse the parameter selection dropdown, then it shows the parameter type as 'widget'. And even in the boilerplate code it shows 'widget' as the parameter, not 'icon'.

So can I use that?

Did you check FlutterFlow's Documentation for this topic?
Yes
9
9 replies