Type Definitions

The following type definitions are available globally.

  • A message reply callback.

    Used for submitting a binary reply back to a Flutter message sender. Also used in for handling a binary message reply received from Flutter.

    Declaration

    Objective-C

    typedef void (^FlutterBinaryReply)(NSData *_Nullable)

    Parameters

    reply

    The reply.

  • A strategy for handling incoming binary messages from Flutter and to send asynchronous replies back to Flutter.

    Declaration

    Objective-C

    typedef void (^FlutterBinaryMessageHandler)(NSData *_Nullable,
                                                FlutterBinaryReply _Nonnull)

    Parameters

    message

    The message.

    reply

    A callback for submitting an asynchronous reply to the sender.

  • A message reply callback.

    Used for submitting a reply back to a Flutter message sender. Also used in the dual capacity for handling a message reply received from Flutter.

    Declaration

    Objective-C

    typedef void (^FlutterReply)(id _Nullable)

    Parameters

    reply

    The reply.

  • A strategy for handling incoming messages from Flutter and to send asynchronous replies back to Flutter.

    Declaration

    Objective-C

    typedef void (^FlutterMessageHandler)(id _Nullable, FlutterReply _Nonnull)

    Parameters

    message

    The message.

    callback

    A callback for submitting a reply to the sender.

  • A method call result callback.

    Used for submitting a method call result back to a Flutter caller. Also used in the dual capacity for handling a method call result received from Flutter.

    Declaration

    Objective-C

    typedef void (^FlutterResult)(id _Nullable)

    Parameters

    result

    The result.

  • A strategy for handling method calls.

    Declaration

    Objective-C

    typedef void (^FlutterMethodCallHandler)(FlutterMethodCall *_Nonnull,
                                             FlutterResult _Nonnull)

    Parameters

    call

    The incoming method call.

    result

    A callback to asynchronously submit the result of the call. Invoke the callback with a FlutterError to indicate that the call failed. Invoke the callback with FlutterMethodNotImplemented to indicate that the method was unknown. Any other values, including nil, are interpreted as successful results.

  • An event sink callback.

    Declaration

    Objective-C

    typedef void (^FlutterEventSink)(id _Nullable)

    Parameters

    event

    The event.

  • A callback for when FlutterHeadlessDartRunner has attempted to start a Dart Isolate in the background.

    Declaration

    Objective-C

    typedef void (^FlutterHeadlessDartRunnerCallback)(BOOL)

    Parameters

    success

    YES if the Isolate was started and run successfully, NO otherwise.