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 moreDeclaration
Objective-C
@interface FlutterAppDelegate : UIResponder <UIApplicationDelegate, FlutterPluginRegistry, FlutterAppLifeCycleProvider>
- Status bar touches are forwarded to the key window’s root view
-
An object containing the result of
See moreFlutterCallbackCache
‘slookupCallbackInformation
method.Declaration
Objective-C
@interface FlutterCallbackInformation : NSObject
-
The cache containing callback information for spawning a
See moreFlutterHeadlessDartRunner
.Declaration
Objective-C
@interface FlutterCallbackCache : NSObject
-
A set of Flutter and Dart assets used by a
See moreFlutterEngine
to initialize execution.Declaration
Objective-C
@interface FlutterDartProject : NSObject
-
The FlutterEngine class coordinates a single instance of execution for a
FlutterDartProject
. It may have zero or oneFlutterViewController
at a time, which can be specified via-setViewController:
.FlutterViewController
‘sinitWithEngine
initializer will automatically call-setViewController:
for itself.A FlutterEngine can be created independently of a
FlutterViewController
for headless execution. It can also persist across the lifespan of multipleFlutterViewController
instances to maintain state and/or asynchronous tasks (such as downloading a large file).Alternatively, you can simply create a new
FlutterViewController
with only aFlutterDartProject
. ThatFlutterViewController
will internally manage its own instance of a FlutterEngine, but will not guarantee survival of the engine beyond the life of the ViewController.A newly initialized FlutterEngine will not actually run a Dart Isolate until either
See more-runWithEntrypoint:
or-runWithEntrypoint:libraryURI
is invoked. One of these methods must be invoked before calling-setViewController:
.Declaration
Objective-C
@interface FlutterEngine : NSObject
-
Propagates
See moreUIAppDelegate
callbacks to registered plugins.Declaration
Objective-C
@interface FlutterPluginAppLifeCycleDelegate : NSObject
-
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 theFlutterEngine
attached FlutterViewController.A FlutterViewController can be initialized either with an already-running
See moreFlutterEngine
, or it can be initialized with aFlutterDartProject
that will be used to spin up a newFlutterEngine
. Developers looking to present and hide FlutterViewControllers in native iOS applications will usually want to maintain theFlutterEngine
instance so as not to lose Dart-related state and asynchronous tasks when navigating back and forth between a FlutterViewController and otherUIViewController
s.Declaration
Objective-C
@interface FlutterViewController : UIViewController