Skip to content

Commit

Permalink
Avoid using runtimeType in the assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Abestanis committed Jul 14, 2024
1 parent ee03739 commit f84d245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/widgets/selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ class SelectAllSelectionAction<T extends Content> extends StatelessWidget {
if (all.isNotEmpty) {
// TODO: selectAll method for the selection controller maybe? (not this "all", but a list of items)
final first = all.first;
assert(all.every((el) => el.runtimeType == first.runtimeType));
assert(all.every((el) => el.type == first.type));

final selectedOfThisType = controller.data.where((el) => el.data.type == entryFactory(first, 0).data.type);
bool allSelected = true;
Expand Down

0 comments on commit f84d245

Please sign in to comment.