use_is_even_rather_than_modulo (#68301)

This commit is contained in:
Alexandre Ardhuin
2020-10-16 20:20:00 +02:00
committed by GitHub
parent 3393566b56
commit c0176c9ee5
22 changed files with 30 additions and 30 deletions

View File

@@ -1376,7 +1376,7 @@ class ReportedDurationTest {
class ListStatistics {
factory ListStatistics(Iterable<int> data) {
assert(data.isNotEmpty);
assert(data.length % 2 == 1);
assert(data.length.isOdd);
final List<int> sortedData = data.toList()..sort();
return ListStatistics._(
sortedData.first,