asset<T> method

T asset<T>(
  1. String fileName
)

Implementation

T asset<T>(String fileName) {
  // get exists
  final exists = hasFile(fileName);
  if (!exists) {
    throw Exception('Asset not found: $fileName');
  }
  return BaseX.getCacheMethod<T>(assetPath(fileName))!;
}