FlutterMethodCall

Objective-C

@interface FlutterMethodCall : NSObject

Swift

class FlutterMethodCall : NSObject

Command object representing a method call on a FlutterMethodChannel.

  • Creates a method call for invoking the specified named method with the specified arguments.

    Declaration

    Objective-C

    + (nonnull instancetype)methodCallWithMethodName:(nonnull NSString *)method
                                           arguments:(id _Nullable)arguments;

    Swift

    convenience init(methodName method: String, arguments: Any?)

    Parameters

    method

    the name of the method to call.

    arguments

    the arguments value.

  • The method name.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull method;

    Swift

    var method: String { get }
  • The arguments.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) id arguments;

    Swift

    var arguments: Any? { get }