public static interface MethodChannel.Result
All methods of this class must be called on the platform thread (Android main thread). For more details see Threading in the Flutter Engine.
Modifier and Type | Method and Description |
---|---|
void |
error(String errorCode,
String errorMessage,
Object errorDetails)
Handles an error result.
|
void |
notImplemented()
Handles a call to an unimplemented method.
|
void |
success(Object result)
Handles a successful result.
|
@UiThread void success(@Nullable Object result)
result
- The 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.@UiThread void error(String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails)
errorCode
- An error code String.errorMessage
- A human-readable error message String, possibly null.errorDetails
- Error 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.@UiThread void notImplemented()