Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterAssets Interface Reference

Public Member Functions

String getAssetFilePathByName (@NonNull String assetFileName)
 
String getAssetFilePathByName (@NonNull String assetFileName, @NonNull String packageName)
 
String getAssetFilePathBySubpath (@NonNull String assetSubpath)
 
String getAssetFilePathBySubpath (@NonNull String assetSubpath, @NonNull String packageName)
 

Detailed Description

Provides Flutter plugins with access to Flutter asset information.

Definition at line 183 of file FlutterPlugin.java.

Member Function Documentation

◆ getAssetFilePathByName() [1/2]

String io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterAssets.getAssetFilePathByName ( @NonNull String  assetFileName)

Returns the relative file path to the Flutter asset with the given name, including the file's extension, e.g., "myImage.jpg".

The returned file path is relative to the Android app's standard assets directory. Therefore, the returned path is appropriate to pass to Android's AssetManager, but the path is not appropriate to load as an absolute path.

◆ getAssetFilePathByName() [2/2]

String io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterAssets.getAssetFilePathByName ( @NonNull String  assetFileName,
@NonNull String  packageName 
)

Same as getAssetFilePathByName(String) but with added support for an explicit Android packageName.

◆ getAssetFilePathBySubpath() [1/2]

String io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterAssets.getAssetFilePathBySubpath ( @NonNull String  assetSubpath)

Returns the relative file path to the Flutter asset with the given subpath, including the file's extension, e.g., "/dir1/dir2/myImage.jpg".

The returned file path is relative to the Android app's standard assets directory. Therefore, the returned path is appropriate to pass to Android's AssetManager, but the path is not appropriate to load as an absolute path.

◆ getAssetFilePathBySubpath() [2/2]

String io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterAssets.getAssetFilePathBySubpath ( @NonNull String  assetSubpath,
@NonNull String  packageName 
)

Same as getAssetFilePathBySubpath(String) but with added support for an explicit Android packageName.


The documentation for this interface was generated from the following file: