Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Public Attributes | List of all members
io.flutter.embedding.engine.systemchannels.KeyEventChannel Class Reference

Classes

interface  EventResponseHandler
 
class  FlutterKeyEvent
 

Public Member Functions

 KeyEventChannel (@NonNull BinaryMessenger binaryMessenger)
 
void sendFlutterKeyEvent ( @NonNull FlutterKeyEvent keyEvent, boolean isKeyUp, @NonNull EventResponseHandler responseHandler)
 

Public Attributes

final BasicMessageChannel< Object > channel
 

Detailed Description

Event message channel for key events to/from the Flutter framework.

Sends key up/down events to the framework, and receives asynchronous messages from the framework about whether or not the key was handled.

Definition at line 25 of file KeyEventChannel.java.

Constructor & Destructor Documentation

◆ KeyEventChannel()

io.flutter.embedding.engine.systemchannels.KeyEventChannel.KeyEventChannel ( @NonNull BinaryMessenger  binaryMessenger)
inline

A constructor that creates a KeyEventChannel with the default message handler.

Parameters
binaryMessengerthe binary messenger used to send messages on this channel.

Definition at line 45 of file KeyEventChannel.java.

45 {
46 this.channel =
47 new BasicMessageChannel<>(binaryMessenger, "flutter/keyevent", JSONMessageCodec.INSTANCE);
48 }

Member Function Documentation

◆ sendFlutterKeyEvent()

void io.flutter.embedding.engine.systemchannels.KeyEventChannel.sendFlutterKeyEvent ( @NonNull FlutterKeyEvent  keyEvent,
boolean  isKeyUp,
@NonNull EventResponseHandler  responseHandler 
)
inline

Definition at line 52 of file KeyEventChannel.java.

55 {
56 channel.send(encodeKeyEvent(keyEvent, isKeyUp), createReplyHandler(responseHandler));
57 }

Member Data Documentation

◆ channel

final BasicMessageChannel<Object> io.flutter.embedding.engine.systemchannels.KeyEventChannel.channel

Definition at line 50 of file KeyEventChannel.java.


The documentation for this class was generated from the following file: