| Flutter iOS Embedder |

FlutterHeadlessDartRunner.mm
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 #define FML_USED_ON_EMBEDDER
6
7 #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterHeadlessDartRunner.h"
8
9 #include <memory>
10
11 #include "flutter/fml/make_copyable.h"
12 #include "flutter/fml/message_loop.h"
13 #include "flutter/shell/common/engine.h"
14 #include "flutter/shell/common/rasterizer.h"
15 #include "flutter/shell/common/run_configuration.h"
16 #include "flutter/shell/common/shell.h"
17 #include "flutter/shell/common/switches.h"
18 #include "flutter/shell/common/thread_host.h"
19 #import "flutter/shell/platform/darwin/common/command_line.h"
20 #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h"
21 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject_Internal.h"
22 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine_Internal.h"
23 #import "flutter/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.h"
24 #import "flutter/shell/platform/darwin/ios/platform_view_ios.h"
25
26 FLUTTER_ASSERT_ARC
27
28 @implementation FlutterHeadlessDartRunner
29
30 - (instancetype)initWithName:(NSString*)labelPrefix project:(FlutterDartProject*)projectOrNil {
31 return [self initWithName:labelPrefix project:projectOrNil allowHeadlessExecution:YES];
32 }
33
34 - (instancetype)initWithName:(NSString*)labelPrefix
35 project:(FlutterDartProject*)projectOrNil
36 allowHeadlessExecution:(BOOL)allowHeadlessExecution {
37 NSAssert(allowHeadlessExecution == YES,
38 @"Cannot initialize a FlutterHeadlessDartRunner without headless execution.");
39 return [self initWithName:labelPrefix
40 project:projectOrNil
41 allowHeadlessExecution:allowHeadlessExecution
42 restorationEnabled:NO];
43 }
44
45 - (instancetype)initWithName:(NSString*)labelPrefix
46 project:(FlutterDartProject*)projectOrNil
47 allowHeadlessExecution:(BOOL)allowHeadlessExecution
48 restorationEnabled:(BOOL)restorationEnabled {
49 NSAssert(allowHeadlessExecution == YES,
50 @"Cannot initialize a FlutterHeadlessDartRunner without headless execution.");
51 return [super initWithName:labelPrefix
52 project:projectOrNil
53 allowHeadlessExecution:allowHeadlessExecution
54 restorationEnabled:restorationEnabled];
55 }
56
57 - (instancetype)init {
58 return [self initWithName:@"io.flutter.headless" project:nil];
59 }
60
61 @end
-[FlutterEngine initWithName:project:allowHeadlessExecution:restorationEnabled:]
instancetype initWithName:project:allowHeadlessExecution:restorationEnabled:(NSString *labelPrefix,[project] nullable FlutterDartProject *project,[allowHeadlessExecution] BOOL allowHeadlessExecution,[restorationEnabled] BOOL NS_DESIGNATED_INITIALIZER)
-[FlutterHeadlessDartRunner initWithName:project:allowHeadlessExecution:restorationEnabled:]
instancetype initWithName:project:allowHeadlessExecution:restorationEnabled:(NSString *labelPrefix,[project] FlutterDartProject *projectOrNil,[allowHeadlessExecution] BOOL allowHeadlessExecution,[restorationEnabled] BOOL NS_DESIGNATED_INITIALIZER)
Definition: FlutterHeadlessDartRunner.mm:45
FlutterEngine_Internal.h
command_line.h
FlutterPlugin.h
-[FlutterHeadlessDartRunner initWithName:project:allowHeadlessExecution:]
instancetype initWithName:project:allowHeadlessExecution:(NSString *labelPrefix,[project] FlutterDartProject *projectOrNil,[allowHeadlessExecution] BOOL allowHeadlessExecution)
Definition: FlutterHeadlessDartRunner.mm:34
FlutterHeadlessDartRunner.h
FlutterHeadlessDartRunner
Definition: FlutterHeadlessDartRunner.h:34
-[FlutterHeadlessDartRunner initWithName:project:]
instancetype initWithName:project:(NSString *labelPrefix,[project] FlutterDartProject *projectOrNil)
Definition: FlutterHeadlessDartRunner.mm:30
FlutterDartProject_Internal.h
platform_view_ios.h
FlutterDartProject
Definition: FlutterDartProject.mm:258
platform_message_response_darwin.h
FLUTTER_ASSERT_ARC
Definition: FlutterChannelKeyResponder.mm:13
-[FlutterHeadlessDartRunner init]
instancetype init()
Definition: FlutterHeadlessDartRunner.mm:57