fromAsset static method

ShaderLibrary? fromAsset(
  1. String assetName
)

Implementation

static ShaderLibrary? fromAsset(String assetName) {
  final lib = ShaderLibrary._();
  final error = lib._initializeWithAsset(assetName);
  if (error != null) {
    throw Exception("Failed to initialize ShaderLibrary: ${error}");
  }
  return lib;
}