import 'package:fast_equatable/fast_equatable.dart'; class EquatableCollection with FastEquatable { final T collection; final bool immutable; EquatableCollection(this.collection, {required this.immutable}) : assert( collection is Map || collection is Iterable || collection == null, 'Collection type not supported', ); @override bool get cacheHash => immutable; @override List get hashParameters => [ collection, immutable, ]; }