getBytesFromAsset static method

Future<Uint8List> getBytesFromAsset(
  1. String path
)

Implementation

static Future<Uint8List> getBytesFromAsset(String path) async {
  final ByteData bytes = await rootBundle.load(path);
  return bytes.buffer.asUint8List();
}