loadBytes static method
Loads any asset: devDir (debug), then the packs, then the bundle.
Implementation
static Future<Uint8List> loadBytes(String path) async {
final b = await packedBytes(path);
if (b != null) return b;
final data = await rootBundle.load(path);
return data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
}