Package io.flutter.embedding.android
Class KeyEmbedderResponder
- java.lang.Object
-
- io.flutter.embedding.android.KeyEmbedderResponder
-
- All Implemented Interfaces:
KeyboardManager.Responder
public class KeyEmbedderResponder extends Object implements KeyboardManager.Responder
AKeyboardManager.Responder
ofKeyboardManager
that handles events by sending processed information inKeyData
.This class corresponds to the HardwareKeyboard API in the framework.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.flutter.embedding.android.KeyboardManager.Responder
KeyboardManager.Responder.OnKeyEventHandledCallback
-
-
Constructor Summary
Constructors Constructor Description KeyEmbedderResponder(BinaryMessenger messenger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleEvent(KeyEvent event, KeyboardManager.Responder.OnKeyEventHandledCallback onKeyEventHandledCallback)
Parses an Android key event, performs synchronization, and dispatches Flutter events through the messenger to the framework with the given callback.
-
-
-
Constructor Detail
-
KeyEmbedderResponder
public KeyEmbedderResponder(BinaryMessenger messenger)
-
-
Method Detail
-
handleEvent
public void handleEvent(@NonNull KeyEvent event, @NonNull KeyboardManager.Responder.OnKeyEventHandledCallback onKeyEventHandledCallback)
Parses an Android key event, performs synchronization, and dispatches Flutter events through the messenger to the framework with the given callback.At least one event will be dispatched. If there are no others, an empty event with 0 physical key and 0 logical key will be synthesized.
- Specified by:
handleEvent
in interfaceKeyboardManager.Responder
- Parameters:
event
- The Android key event to be handled.onKeyEventHandledCallback
- the method to call when the framework has decided whether to handle this event. This callback will always be called once and only once. If there are no non-synthesized out of this event, this callback will be called during this method with true.
-
-