FlutterDartProject

@interface FlutterDartProject : NSObject

A set of Flutter and Dart assets used by a FlutterEngine to initialize execution.

  • Initializes with a specific

    Declaration

    Objective-C

    - (instancetype)initWithPrecompiledDartBundle:(NSBundle *)bundle;
  • Initializes with a specific set of Flutter Assets, with a specified location of main() and Dart packages.

    Declaration

    Objective-C

    - (instancetype)initWithFlutterAssets:(NSURL *)flutterAssetsURL
                                 dartMain:(NSURL *)dartMainURL
                                 packages:(NSURL *)dartPackages;
  • Initializes from a specific set of Flutter Assets.

    Declaration

    Objective-C

    - (instancetype)initWithFlutterAssetsWithScriptSnapshot:
        (NSURL *)flutterAssetsURL;
  • Unavailable - use init instead.

    Declaration

    Objective-C

    - (instancetype)initFromDefaultSourceForConfiguration;
  • Returns the file name for the given asset. The returned file name can be used to access the asset in the application’s main bundle.

    Declaration

    Objective-C

    + (NSString *)lookupKeyForAsset:(NSString *)asset;

    Parameters

    asset

    The name of the asset. The name can be hierarchical.

    Return Value

    the file name to be used for lookup in the main bundle.

  • Returns the file name for the given asset which originates from the specified package. The returned file name can be used to access the asset in the application’s main bundle.

    Declaration

    Objective-C

    + (NSString *)lookupKeyForAsset:(NSString *)asset
                        fromPackage:(NSString *)package;

    Parameters

    asset

    The name of the asset. The name can be hierarchical.

    package

    The name of the package from which the asset originates.

    Return Value

    the file name to be used for lookup in the main bundle.

  • Returns the default identifier for the bundle where we expect to find the Flutter Dart application.

    Declaration

    Objective-C

    + (NSString *)defaultBundleIdentifier;