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

@@ -28,7 +28,7 @@ class AsymmetricView extends StatelessWidget {
return List<Container>.generate(_listItemCount(products.length), (int index) {
double width = .59 * MediaQuery.of(context).size.width;
Widget column;
if (index % 2 == 0) {
if (index.isEven) {
/// Even cases
final int bottom = _evenCasesIndex(index);
column = TwoProductCardColumn(