exists method
Because the asset is loaded by rootBundle, it is always available.
If the asset is not available, the error is caught by FlutterAssetImageInput.create
.
Implementation
@override
Future<bool> exists() async {
try {
await byteData;
return true;
} catch (e) {
return false;
}
}