Flutter Engine
 
Loading...
Searching...
No Matches
FlutterLaunchEngine.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERLAUNCHENGINE_H_
6#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERLAUNCHENGINE_H_
7
9
10/**
11 * A lazy container for an engine that will only dispense one engine.
12 *
13 * This is used to hold an engine for plugin registration when the
14 * GeneratedPluginRegistrant is called on a FlutterAppDelegate before the first
15 * FlutterViewController is set up. This is the typical flow after the
16 * UISceneDelegate migration.
17 *
18 * The launch engine is intended to work only with first FlutterViewController
19 * instantiated with a NIB since that is the only FlutterEngine that registers
20 * plugins through the FlutterAppDelegate.
21 */
22@interface FlutterLaunchEngine : NSObject
23
24/**
25 * Accessor for the launch engine.
26 *
27 * Getting this may allocate an engine.
28 */
29@property(nonatomic, strong, nullable, readonly) FlutterEngine* engine;
30
31/**
32 * Take ownership of the launch engine.
33 *
34 * After this is called `self.engine` and `takeEngine` will always return nil.
35 */
36- (nullable FlutterEngine*)takeEngine;
37
38@end
39
40#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERLAUNCHENGINE_H_
nullable FlutterEngine * takeEngine()