Skip to content

Commit

Permalink
Use double.isNaN instead of ... == double.nan (which is always fa…
Browse files Browse the repository at this point in the history
…lse) (#115424)
  • Loading branch information
mkustermann authored Nov 18, 2022
1 parent 6926960 commit de4c0b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flutter_test/lib/src/accessibility.dart
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ class _ContrastReport {
count += entry.value;
}
final double averageLightness = totalLightness / count;
assert(averageLightness != double.nan);
assert(!averageLightness.isNaN);

MapEntry<Color, int>? lightColor;
MapEntry<Color, int>? darkColor;
Expand Down

0 comments on commit de4c0b1

Please sign in to comment.