public static interface FlutterPlugin.FlutterAssets
| Modifier and Type | Method and Description |
|---|---|
String |
getAssetFilePathByName(String assetFileName)
Returns the relative file path to the Flutter asset with the given name, including the file's
extension, e.g.,
"myImage.jpg". |
String |
getAssetFilePathByName(String assetFileName,
String packageName)
Same as
getAssetFilePathByName(String) but with added support for an explicit
Android packageName. |
String |
getAssetFilePathBySubpath(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". |
String |
getAssetFilePathBySubpath(String assetSubpath,
String packageName)
Same as
getAssetFilePathBySubpath(String) but with added support for an explicit
Android packageName. |
String getAssetFilePathByName(@NonNull String assetFileName)
"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.
String getAssetFilePathByName(@NonNull String assetFileName, @NonNull String packageName)
getAssetFilePathByName(String) but with added support for an explicit
Android packageName.String getAssetFilePathBySubpath(@NonNull String assetSubpath)
"/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.
String getAssetFilePathBySubpath(@NonNull String assetSubpath, @NonNull String packageName)
getAssetFilePathBySubpath(String) but with added support for an explicit
Android packageName.