Flutter Engine
FlutterDartProject.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_FLUTTERDARTPROJECT_H_
6 #define FLUTTER_FLUTTERDARTPROJECT_H_
7 
8 #import <Foundation/Foundation.h>
9 
10 #import "FlutterMacros.h"
11 
12 /**
13  * A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution.
14  *
15  * TODO(stuartmorgan): Align API with FlutterDartProject, and combine.
16  */
18 @interface FlutterDartProject : NSObject
19 
20 /**
21  * Initializes a Flutter Dart project from a bundle.
22  *
23  * The bundle must either contain a flutter_assets resource directory, or set the Info.plist key
24  * FLTAssetsPath to override that name (if you are doing a custom build using a different name).
25  *
26  * @param bundle The bundle containing the Flutter assets directory. If nil, the App framework
27  * created by Flutter will be used.
28  */
29 - (nonnull instancetype)initWithPrecompiledDartBundle:(nullable NSBundle*)bundle
30  NS_DESIGNATED_INITIALIZER;
31 
32 /**
33  * If set, allows the Flutter project to use the dart:mirrors library.
34  *
35  * Deprecated: This function is temporary and will be removed in a future release.
36  */
37 @property(nonatomic) bool enableMirrors;
38 
39 /**
40  * An NSArray of NSStrings to be passed as command line arguments to the Dart entrypoint.
41  *
42  * If this is not explicitly set, this will default to the contents of
43  * [NSProcessInfo arguments], without the binary name.
44  *
45  * Set this to nil to pass no arguments to the Dart entrypoint.
46  */
47 @property(nonatomic, nullable) NSArray<NSString*>* dartEntrypointArguments;
48 
49 @end
50 
51 #endif // FLUTTER_FLUTTERDARTPROJECT_H_
NSArray< NSString * > * dartEntrypointArguments
#define FLUTTER_EXPORT