Classes

The following classes are available globally.

  • UIApplicationDelegate subclass for simple apps that want default behavior.

    This class implements the following behaviors:

    • Status bar touches are forwarded to the key window’s root view FlutterViewController, in order to trigger scroll to top.
    • Keeps the Flutter connection open in debug mode when the phone screen locks.

    App delegates for Flutter applications are not required to inherit from this class. Developers of custom app delegate classes should copy and paste code as necessary from FlutterAppDelegate.mm.

    See more

    Declaration

    Objective-C

    @interface FlutterAppDelegate
        : UIResponder <UIApplicationDelegate, FlutterPluginRegistry,
                       FlutterAppLifeCycleProvider>
  • A channel for communicating with the Flutter side using basic, asynchronous message passing.

    See more

    Declaration

    Objective-C

    @interface FlutterBasicMessageChannel : NSObject
  • A channel for communicating with the Flutter side using invocation of asynchronous methods.

    See more

    Declaration

    Objective-C

    @interface FlutterMethodChannel : NSObject
  • A channel for communicating with the Flutter side using event streams.

    See more

    Declaration

    Objective-C

    @interface FlutterEventChannel : NSObject
  • A FlutterMessageCodec using unencoded binary messages, represented as NSData instances.

    This codec is guaranteed to be compatible with the corresponding BinaryCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.

    On the Dart side, messages are represented using ByteData.

    Declaration

    Objective-C

    @interface FlutterBinaryCodec : NSObject <FlutterMessageCodec>
  • A FlutterMessageCodec using UTF-8 encoded NSString messages.

    This codec is guaranteed to be compatible with the corresponding StringCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.

    Declaration

    Objective-C

    @interface FlutterStringCodec : NSObject <FlutterMessageCodec>
  • A FlutterMessageCodec using UTF-8 encoded JSON messages.

    This codec is guaranteed to be compatible with the corresponding JSONMessageCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.

    Supports values accepted by NSJSONSerialization plus top-level nil, NSNumber, and NSString.

    On the Dart side, JSON messages are handled by the JSON facilities of the dart:convert package.

    Declaration

    Objective-C

    @interface FlutterJSONMessageCodec : NSObject <FlutterMessageCodec>
  • A writer of the Flutter standard binary encoding.

    See FlutterStandardMessageCodec for details on the encoding.

    The encoding is extensible via subclasses overriding writeValue.

    See more

    Declaration

    Objective-C

    @interface FlutterStandardWriter : NSObject
  • A reader of the Flutter standard binary encoding.

    See FlutterStandardMessageCodec for details on the encoding.

    The encoding is extensible via subclasses overriding readValueOfType.

    See more

    Declaration

    Objective-C

    @interface FlutterStandardReader : NSObject
  • A factory of compatible reader/writer instances using the Flutter standard binary encoding or extensions thereof.

    See more

    Declaration

    Objective-C

    @interface FlutterStandardReaderWriter : NSObject
  • A FlutterMessageCodec using the Flutter standard binary encoding.

    This codec is guaranteed to be compatible with the corresponding StandardMessageCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.

    Supported messages are acyclic values of these forms:

    • nil or NSNull
    • NSNumber (including their representation of Boolean values)
    • NSString
    • FlutterStandardTypedData
    • NSArray of supported values
    • NSDictionary with supported keys and values

    On the Dart side, these values are represented as follows:

    • nil or NSNull: null
    • NSNumber: bool, int, or double, depending on the contained value.
    • NSString: String
    • FlutterStandardTypedData: Uint8List, Int32List, Int64List, or Float64List
    • NSArray: List
    • NSDictionary: Map
    See more

    Declaration

    Objective-C

    @interface FlutterStandardMessageCodec : NSObject <FlutterMessageCodec>
  • Command object representing a method call on a FlutterMethodChannel.

    See more

    Declaration

    Objective-C

    @interface FlutterMethodCall : NSObject
  • Error object representing an unsuccessful outcome of invoking a method on a FlutterMethodChannel, or an error event on a FlutterEventChannel.

    See more

    Declaration

    Objective-C

    @interface FlutterError : NSObject
  • A byte buffer holding UInt8, SInt32, SInt64, or Float64 values, used with FlutterStandardMessageCodec and FlutterStandardMethodCodec.

    Two’s complement encoding is used for signed integers. IEEE754 double-precision representation is used for floats. The platform’s native endianness is assumed.

    See more

    Declaration

    Objective-C

    @interface FlutterStandardTypedData : NSObject
  • Unavailable

    Unavailable on 2018-08-31. Deprecated on 2018-01-09. FlutterStandardBigInteger was needed because the Dart 1.0 int type had no size limit. With Dart 2.0, the int type is a fixed-size, 64-bit signed integer. If you need to communicate larger integers, use NSString encoding instead.

    An arbitrarily large integer value, used with FlutterStandardMessageCodec and FlutterStandardMethodCodec.

    Declaration

    Objective-C

    
    @interface FlutterStandardBigInteger : NSObject
  • A FlutterMethodCodec using UTF-8 encoded JSON method calls and result envelopes.

    This codec is guaranteed to be compatible with the corresponding JSONMethodCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.

    Values supported as methods arguments and result payloads are those supported as top-level or leaf values by FlutterJSONMessageCodec.

    Declaration

    Objective-C

    @interface FlutterJSONMethodCodec : NSObject <FlutterMethodCodec>
  • A FlutterMethodCodec using the Flutter standard binary encoding.

    This codec is guaranteed to be compatible with the corresponding StandardMethodCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.

    Values supported as method arguments and result payloads are those supported by FlutterStandardMessageCodec.

    See more

    Declaration

    Objective-C

    @interface FlutterStandardMethodCodec : NSObject <FlutterMethodCodec>
  • Deprecated

    FlutterEngine should be used rather than FlutterHeadlessDartRunner

    The FlutterHeadlessDartRunner runs Flutter Dart code with a null rasterizer, and no native drawing surface. It is appropriate for use in running Dart code e.g. in the background from a plugin.

    Most callers should prefer using FlutterEngine directly; this interface exists for legacy support.

    See more

    Declaration

    Objective-C

    
    @interface FlutterHeadlessDartRunner : FlutterEngine
  • A UIViewController implementation for Flutter views.

    Dart execution, channel communication, texture registration, and plugin registration are all handled by FlutterEngine. Calls on this class to those members all proxy through to the FlutterEngine attached FlutterViewController.

    A FlutterViewController can be initialized either with an already-running FlutterEngine via the initWithEngine: initializer, or it can be initialized with a FlutterDartProject that will be used to implicitly spin up a new FlutterEngine. Creating a FlutterEngine before showing aFlutterViewControllercan be used to pre-initialize the Dart VM and to prepare the isolate in order to reduce the latency to the first rendered frame. Holding aFlutterEngine independently of FlutterViewControllers can also be used to not to lose Dart-related state and asynchronous tasks when navigating back and forth between a FlutterViewController and other UIViewController`s.

    See more

    Declaration

    Objective-C

    @interface FlutterViewController
        : UIViewController <FlutterTextureRegistry, FlutterPluginRegistry>