• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "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  */
17 FLUTTER_EXPORT
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 main bundle is
27  *               used.
28  */
29 - (nonnull instancetype)initWithPrecompiledDartBundle:(nullable NSBundle*)bundle
30     NS_DESIGNATED_INITIALIZER;
31 
32 /**
33  * Switches to pass to the Flutter engine. See
34  * https://github.com/flutter/engine/blob/master/shell/common/switches.h
35  * for details. Not all switches will apply to embedding mode. Switches have not stability
36  * guarantee, and are subject to change without notice.
37  *
38  * Note: This property WILL BE REMOVED in the future. If you use this property, please see
39  * https://github.com/flutter/flutter/issue/38569.
40  */
41 @property(nullable) NSArray<NSString*>* engineSwitches;
42 
43 @end
44 
45 #endif  // FLUTTER_FLUTTERDARTPROJECT_H_
46