loadImageAsset static method
Implementation
static Future<bool> loadImageAsset(String name) async {
final img = AssetImage('bloc/images/$name');
const config = ImageConfiguration.empty;
final key = await img.obtainKey(config);
final data = await key.bundle.load(key.name);
imageData.add(Mimage(name));
imageData.firstWhere((element) => element.name == name).data =
Uint8List.fromList(data.buffer.asUint8List());
if (kDebugMode) {
print('manager => loaded $name');
}
return true;
}