[2.0.1]Exception when the key of Map is not subtype of type Comparable.
elseyu opened this issue · 3 comments
elseyu commented
Describe the bug
Exception when the key of Map is not subtype of type Comparable.
To Reproduce
- Define a Map<Type not comparable, V>
- Define your class which extends Equable
class Key extends Equable {
Map<Type not comparable, V> cacheMap,
@override
List<Object?> get props => [cacheMap];
}
- Exception on:
[flutter_exception][:0]type 'Key' is not a subtype of type 'Comparable'
[flutter_exception][:0]#0 _dynamicCompare (dart:collection/splay_tree.dart:261:65)
#1 _SplayTree._splay (dart:collection/splay_tree.dart:93:21)
#2 SplayTreeMap.[]= (dart:collection/splay_tree.dart:391:16)
#3 SplayTreeMap.addAll. (dart:collection/splay_tree.dart:422:11)
#4 LinkedLruHashMap.forEach (package:kk_shared/common/util/lru_map.dart:87:8)
#5 SplayTreeMap.addAll (dart:collection/splay_tree.dart:421:11)
#6 new SplayTreeMap.of (dart:collection/splay_tree.dart:329:48)
#7 _combine (package:equatable/src/equatable_utils.dart:44:5)
Version
2.0.1
felangel commented
felangel commented
The fix has been published in v2.0.2. Please let me know if that helps and again I apologize for the inconvenience!