android – Blocking the default behavior of arrow keys in Flutter mobile app-ThrowExceptions

Exception or error:

In my flutter app I have multiple elements like text fields, switches, sliders etc displayed in a view. When I connect an external keyboard and press arrow keys I am getting the default behaviour meaning the focus will shift from element to element. Is there a way to block it but at the same time still have the RawKeyEvents that are generated when the keys are pressed (for Android keycodes for arrow keys are: 19,20,21,22) delivered to the app?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *