Flutter iOS Embedder
FlutterDartProject_Internal.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_FLUTTERDARTPROJECT_INTERNAL_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERDARTPROJECT_INTERNAL_H_
7 
8 #include "flutter/common/settings.h"
9 #include "flutter/runtime/platform_data.h"
10 #include "flutter/shell/common/engine.h"
13 
15 
16 flutter::Settings FLTDefaultSettingsForBundle(NSBundle* _Nullable bundle = nil,
17  NSProcessInfo* _Nullable processInfoOrNil = nil);
18 
19 /// Returns the value of the FLTEnableWideGamut key from the given bundle,
20 /// falling back to the main bundle if not found in the first. If both bundles
21 /// are the same object, the value is read once.
22 NSNumber* _Nullable FLTEnableWideGamutFromBundle(NSBundle* _Nullable bundle,
23  NSBundle* _Nullable mainBundle);
24 
25 @interface FlutterDartProject ()
26 
27 @property(nonatomic, readonly) BOOL isWideGamutEnabled;
28 
29 /**
30  * This is currently used for *only for tests* to override settings.
31  */
32 - (instancetype)initWithSettings:(const flutter::Settings&)settings;
33 - (const flutter::Settings&)settings;
34 - (const flutter::PlatformData)defaultPlatformData;
35 
36 - (flutter::RunConfiguration)runConfiguration;
37 - (flutter::RunConfiguration)runConfigurationForEntrypoint:(nullable NSString*)entrypointOrNil;
38 - (flutter::RunConfiguration)runConfigurationForEntrypoint:(nullable NSString*)entrypointOrNil
39  libraryOrNil:(nullable NSString*)dartLibraryOrNil;
40 - (flutter::RunConfiguration)runConfigurationForEntrypoint:(nullable NSString*)entrypointOrNil
41  libraryOrNil:(nullable NSString*)dartLibraryOrNil
42  entrypointArgs:
43  (nullable NSArray<NSString*>*)entrypointArgs;
44 
45 + (NSString*)flutterAssetsName:(NSBundle*)bundle;
46 + (NSString*)domainNetworkPolicy:(NSDictionary*)appTransportSecurity;
47 + (bool)allowsArbitraryLoads:(NSDictionary*)appTransportSecurity;
48 
49 @end
50 
52 
53 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERDARTPROJECT_INTERNAL_H_
NSNumber *_Nullable FLTEnableWideGamutFromBundle(NSBundle *_Nullable bundle, NSBundle *_Nullable mainBundle)
NS_ASSUME_NONNULL_BEGIN flutter::Settings FLTDefaultSettingsForBundle(NSBundle *_Nullable bundle=nil, NSProcessInfo *_Nullable processInfoOrNil=nil)
#define NS_ASSUME_NONNULL_BEGIN
Definition: FlutterMacros.h:19
#define NS_ASSUME_NONNULL_END
Definition: FlutterMacros.h:20