toMap method
Return the entire contents of the cache as Map.
NOTE: some Stores might return mutable objects referenced by the store itself.
Implementation
@override
Map<String, Map<String, dynamic>?> toMap() {
final map = <String, Map<String, dynamic>?>{};
for (final key in box.keys) {
if (key is String) {
map[key] = get(key);
}
}
return Map.unmodifiable(map);
}