fromAsset static method

Future<JsonImage> fromAsset(
  1. String assetFileName
)

Creates a new instance of JsonImage from an asset.

Implementation

static Future<JsonImage> fromAsset(String assetFileName) async {
  final byteData = await rootBundle.load(assetFileName);

  return JsonImage(byteBuffer: byteData.buffer);
}