Flutter Engine
The Flutter Engine
|
Public Member Functions | |
MethodCall (@NonNull String method, @Nullable Object arguments) | |
boolean | hasArgument (@NonNull String key) |
Public Attributes | |
final String | method |
final Object | arguments |
Package Functions | |
public< T > T | arguments () |
public< T > T | argument (@NonNull String key) |
Command object representing a method call on a MethodChannel
.
Definition at line 14 of file MethodCall.java.
|
inline |
Creates a MethodCall
with the specified method name and arguments.
method | the method name String, not null. |
arguments | the arguments, a value supported by the channel's message codec. Possibly, null. |
Definition at line 34 of file MethodCall.java.
Returns a String-keyed argument of this method call, assuming arguments
is a Map
or a JSONObject
. The static type of the returned result is determined by the call-site.
<T> | the intended type of the argument. |
key | the String key. |
null
, if such an entry is not present. ClassCastException | if arguments can be cast to neither Map nor JSONObject . |
Definition at line 68 of file MethodCall.java.
Returns the arguments of this method call with a static type determined by the call-site.
<T> | the intended type of the arguments. |
Definition at line 50 of file MethodCall.java.
|
inline |
Returns whether this method call involves a mapping for the given argument key, assuming arguments
is a Map
or a JSONObject
. The value associated with the key, as returned by argument(String)
, is not considered, and may be null
.
key | the String key. |
true
, if arguments
is a Map
containing key, or a JSONObject
with a mapping for key. ClassCastException | if arguments can be cast to neither Map nor JSONObject . |
Definition at line 91 of file MethodCall.java.
final Object io.flutter.plugin.common.MethodCall.arguments |
Arguments for the call.
Consider using arguments()
for cases where a particular run-time type is expected. Consider using argument(String)
when that run-time type is Map
or JSONObject
.
Definition at line 25 of file MethodCall.java.
final String io.flutter.plugin.common.MethodCall.method |
The name of the called method.
Definition at line 16 of file MethodCall.java.