Describe the quick-fix
The linter tell me to use .inEven, although I can't in this scenario. I'd have to remove the const from Widget constructor for that.
Examples
class PartnersCarousel extends StatefulWidget {
const PartnersCarousel({
super.key,
required this.itemsPerPage,
required this.partners,
})
// LINT: use_is_even_rather_than_modulo
: assert(itemsPerPage % 2 == 0, 'itemsPerPage must be even');
final int itemsPerPage;
final List<Partner> partners;
@override
State<PartnersCarousel> createState() => _PartnersCarouselState();
}
Additional contextisEven can't be used in "const" contexts and therefore should not be recommended in these situations.
Describe the quick-fix The linter tell me to use .inEven, although I can't in this scenario. I'd have to remove the const from Widget constructor for that.
Examples
Additional context
isEven
can't be used in "const" contexts and therefore should not be recommended in these situations.