Unverified Commit 8f896c90 authored by Paul Berry's avatar Paul Berry Committed by GitHub

Ignore another dead_code hint for a weak-only null check. (#63602)

parent 0ec50a8e
......@@ -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');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment