FlutterDartProject

@interface FlutterDartProject : NSObject

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

  • Initializes a Flutter Dart project from a bundle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPrecompiledDartBundle:
        (nullable NSBundle *)bundle;
  • Unavailable

    Use -init instead.

    Unavailable - use init instead.

    Declaration

    Objective-C

    - (nonnull instancetype)initFromDefaultSourceForConfiguration;
  • Returns the file name for the given asset. If the bundle with the identifier “io.flutter.flutter.app” exists, it will try use that bundle; otherwise, it will use the main bundle. To specify a different bundle, use -lookupKeyForAsset:asset:fromBundle.

    Declaration

    Objective-C

    + (nonnull NSString *)lookupKeyForAsset:(nonnull 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. The returned file name can be used to access the asset in the supplied bundle.

    Declaration

    Objective-C

    + (nonnull NSString *)lookupKeyForAsset:(nonnull NSString *)asset
                                 fromBundle:(nullable NSBundle *)bundle;

    Parameters

    asset

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

    bundle

    The NSBundle to use for looking up the asset.

    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

    + (nonnull NSString *)lookupKeyForAsset:(nonnull NSString *)asset
                                fromPackage:(nonnull 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 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 specified bundle.

    Declaration

    Objective-C

    + (nonnull NSString *)lookupKeyForAsset:(nonnull NSString *)asset
                                fromPackage:(nonnull NSString *)package
                                 fromBundle:(nullable NSBundle *)bundle;

    Parameters

    asset

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

    package

    The name of the package from which the asset originates.

    bundle

    The bundle to use when doing the lookup.

    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

    + (nonnull NSString *)defaultBundleIdentifier;