tryAssetPath method

Future<String> tryAssetPath(
  1. String staticPath
)

Attempts to generate a cache-busted URL. If the file cannot be found or read, returns staticPath unchanged.

Implementation

Future<String> tryAssetPath(final String staticPath) async {
  try {
    return await assetPath(staticPath);
  } catch (_) {
    return staticPath;
  }
}