Ignore another dead_code hint for a weak-only null check. (#63602)
This commit is contained in:
@@ -672,7 +672,10 @@ abstract class AssetBundleImageProvider extends ImageProvider<AssetBundleImageKe
|
||||
PaintingBinding.instance!.imageCache!.evict(key);
|
||||
rethrow;
|
||||
}
|
||||
if (data == null) {
|
||||
// `key.bundle.load` has a non-nullable return type, but might be null when
|
||||
// running with weak checking, so we need to null check it anyway (and
|
||||
// ignore the warning that the null-handling logic is dead code).
|
||||
if (data == null) { // ignore: dead_code
|
||||
PaintingBinding.instance!.imageCache!.evict(key);
|
||||
throw StateError('Unable to read data');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user