imgAssets2Uint8List static method

Future<Uint8List> imgAssets2Uint8List(
  1. String path
)

Implementation

static Future<Uint8List> imgAssets2Uint8List(String path) async {
  final byteData = await rootBundle.load('$path');
  Uint8List resp = byteData.buffer
      .asUint8List(byteData.offsetInBytes, byteData.lengthInBytes);
  return resp;
}