loadAssetFile method
Implementation
Future<Uint8List?> loadAssetFile() async {
try {
if (kCanRunProcess) {
final file = _getAssetFile();
if (await file.exists()) {
return await file.readAsBytes();
} else {
return null;
}
}
final asset = await rootBundle.load(_getAssetFile().path);
return asset.buffer.asUint8List();
} catch (e) {
return null;
}
}