You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to Reproduce
1 _ Opening box with <Map<>String , dynamic> generic
2 _ adding some valid map to box using put method
3 _ reading box.values from box
Code sample
voidmain() async {
awaitHive.initFlutter();
awaitHive.openBox<Map<String, dynamic>>('activities');
}
Activity activity =Activity(
id:'uniqueId',
name:'Doing HomeWork',
);
box =Hive.box<Map<String, dynamic>>('activities');
box.put(activity.id, activity.toJson()); // works fine
box =Hive.box<Map<String, dynamic>>('activities');
List<Map<String, dynamic>> list = box.values.toList(); // throws "type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, dynamic>' in type cast" after the first Hot restart or closing and opening application
// stacktarce info doesnt say much , but here it is
When the exception was thrown, this was the stack
#0 Keystore.getValues.<anonymous closure>package:hive/…/box/keystore.dart:122
#1 MappedIterator.moveNext (dart:_internal/iterable.dart:392:20)
#2 new List.from (dart:core-patch/array_patch.dart:50:19)
#3 new List.of (dart:core-patch/array_patch.dart:68:17)
#4 Iterable.toList (dart:core/iterable.dart:404:12)
Version
Platform: iOS, Android
Flutter version: 1.22.3 • channel stable
Hive version: 1.4.4+1
hive_flutter: 0.3.1
The text was updated successfully, but these errors were encountered:
Steps to Reproduce
1 _ Opening box with <Map<>String , dynamic> generic
2 _ adding some valid map to box using put method
3 _ reading box.values from box
Code sample
// stacktarce info doesnt say much , but here it is
Version
The text was updated successfully, but these errors were encountered: