Package io.flutter.plugin.common
Interface MethodChannel.Result
- All Known Implementing Classes:
ErrorLogResult
- Enclosing class:
- MethodChannel
public static interface MethodChannel.Result
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.
-
Method Summary
-
Method Details
-
success
Handles a successful result.- Parameters:
result
- The result, possibly null. The result must be an Object type supported by the codec. For instance, if you are usingStandardMessageCodec
(default), please see its documentation on what types are supported.
-
error
Handles an error result.- Parameters:
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 usingStandardMessageCodec
(default), please see its documentation on what types are supported.
-
notImplemented
void notImplemented()Handles a call to an unimplemented method.
-