assetExists method

Future<bool> assetExists(
  1. String relativePath
)

Checks if an asset exists in the package.

relativePath - Path relative to the package root

Returns true if the asset exists, false otherwise.

Implementation

Future<bool> assetExists(String relativePath) async {
  try {
    await _loadFromPackage(relativePath);
    return true;
  } catch (e) {
    return false;
  }
}