Files
MrbWebLibre/app/lib/domain/entities/equatable_iterable.dart
T
2025-02-20 12:27:34 +01:00

19 lines
482 B
Dart

import 'package:fast_equatable/fast_equatable.dart';
class EquatableCollection<T> 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<Object?> get hashParameters => [collection, immutable];
}