Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.plugin.common.MethodChannel.Result Interface Reference
Inheritance diagram for io.flutter.plugin.common.MethodChannel.Result:
io.flutter.plugin.common.ErrorLogResult io.flutter.plugin.mouse.StoredResult

Public Member Functions

void success (@Nullable Object result)
 
void error ( @NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails)
 
void notImplemented ()
 

Detailed Description

Method call result callback. Supports dual use: Implementations of methods to be invoked by Flutter act as clients of this interface for sending results back to Flutter. Invokers of Flutter methods provide implementations of this interface for handling results received from Flutter.

All methods of this class can be invoked on any thread.

Definition at line 203 of file MethodChannel.java.

Member Function Documentation

◆ error()

void io.flutter.plugin.common.MethodChannel.Result.error ( @NonNull String  errorCode,
@Nullable String  errorMessage,
@Nullable Object  errorDetails 
)

Handles an error result.

Parameters
errorCodeAn error code String.
errorMessageA human-readable error message String, possibly null.
errorDetailsError details, possibly null. The details must be an Object type supported by the codec. For instance, if you are using StandardMessageCodec (default), please see its documentation on what types are supported.

◆ notImplemented()

void io.flutter.plugin.common.MethodChannel.Result.notImplemented ( )

Handles a call to an unimplemented method.

Implemented in io.flutter.plugin.common.ErrorLogResult, and io.flutter.plugin.mouse.StoredResult.

◆ success()

void io.flutter.plugin.common.MethodChannel.Result.success ( @Nullable Object  result)

Handles a successful result.

Parameters
resultThe result, possibly null. The result must be an Object type supported by the codec. For instance, if you are using StandardMessageCodec (default), please see its documentation on what types are supported.

Implemented in io.flutter.plugin.common.ErrorLogResult.


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