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) {
      final value = box.get(key);
      if (value == null) {
        map[key] = null;
      } else if (value is Map) {
        map[key] = _transformMap(value.cast<dynamic, dynamic>());
      }
    }
  }
  return Map.unmodifiable(map);
}