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

Public Member Functions

 BackGestureChannel (@NonNull DartExecutor dartExecutor)
 
void startBackGesture (@NonNull BackEvent backEvent)
 
void updateBackGestureProgress (@NonNull BackEvent backEvent)
 
void commitBackGesture ()
 
void cancelBackGesture ()
 
void setMethodCallHandler (@Nullable MethodChannel.MethodCallHandler handler)
 

Public Attributes

final MethodChannel channel
 

Detailed Description

A MethodChannel for communicating back gesture events to the Flutter framework.

The BackGestureChannel facilitates communication between the platform-specific Android back gesture handling code and the Flutter framework. It enables the dispatch of back gesture events such as start, progress, commit, and cancellation from the platform to the Flutter application.

Definition at line 29 of file BackGestureChannel.java.

Constructor & Destructor Documentation

◆ BackGestureChannel()

io.flutter.embedding.engine.systemchannels.BackGestureChannel.BackGestureChannel ( @NonNull DartExecutor  dartExecutor)
inline

Constructs a BackGestureChannel.

Parameters
dartExecutorThe DartExecutor used to establish communication with the Flutter framework.

Definition at line 40 of file BackGestureChannel.java.

40 {
41 this.channel =
42 new MethodChannel(dartExecutor, "flutter/backgesture", StandardMethodCodec.INSTANCE);
43 channel.setMethodCallHandler(defaultHandler);
44 }
void setMethodCallHandler(final @Nullable MethodCallHandler handler)

Member Function Documentation

◆ cancelBackGesture()

void io.flutter.embedding.engine.systemchannels.BackGestureChannel.cancelBackGesture ( )
inline

Cancels the back gesture event.

This method should be called when a back gesture is cancelled or the back button is pressed.

Definition at line 104 of file BackGestureChannel.java.

104 {
105 Log.v(TAG, "Sending message to cancel back gesture");
106 channel.invokeMethod("cancelBackGesture", null);
107 }
void invokeMethod(@NonNull String method, @Nullable Object arguments)
void Log(const char *format,...) SK_PRINTF_LIKE(1
Definition: TestRunner.cpp:137

◆ commitBackGesture()

void io.flutter.embedding.engine.systemchannels.BackGestureChannel.commitBackGesture ( )
inline

Commits the back gesture event.

This method should be called to signify the completion of a back gesture event and commit the navigation action initiated by the gesture.

Definition at line 92 of file BackGestureChannel.java.

92 {
93 Log.v(TAG, "Sending message to commit back gesture");
94 channel.invokeMethod("commitBackGesture", null);
95 }

◆ setMethodCallHandler()

void io.flutter.embedding.engine.systemchannels.BackGestureChannel.setMethodCallHandler ( @Nullable MethodChannel.MethodCallHandler  handler)
inline

Sets a method call handler for the channel.

Parameters
handlerThe handler to set for the channel.

Definition at line 114 of file BackGestureChannel.java.

114 {
116 }

◆ startBackGesture()

void io.flutter.embedding.engine.systemchannels.BackGestureChannel.startBackGesture ( @NonNull BackEvent  backEvent)
inline

Initiates a back gesture event.

This method should be called when the back gesture is initiated by the user.

Parameters
backEventThe BackEvent object containing information about the touch.

Definition at line 65 of file BackGestureChannel.java.

65 {
66 Log.v(TAG, "Sending message to start back gesture");
67 channel.invokeMethod("startBackGesture", backEventToJsonMap(backEvent));
68 }

◆ updateBackGestureProgress()

void io.flutter.embedding.engine.systemchannels.BackGestureChannel.updateBackGestureProgress ( @NonNull BackEvent  backEvent)
inline

Updates the progress of a back gesture event.

This method should be called to update the progress of an ongoing back gesture event.

Parameters
backEventAn BackEvent object describing the progress event.

Definition at line 79 of file BackGestureChannel.java.

79 {
80 Log.v(TAG, "Sending message to update back gesture progress");
81 channel.invokeMethod("updateBackGestureProgress", backEventToJsonMap(backEvent));
82 }

Member Data Documentation

◆ channel

final MethodChannel io.flutter.embedding.engine.systemchannels.BackGestureChannel.channel

Definition at line 32 of file BackGestureChannel.java.


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