setJson abstract method

Future<void> setJson(
  1. String key,
  2. Map<String, dynamic> value
)

Saves a JSON object (Map) with the given key.

This method stores a JSON-serializable map in the storage, associating it with the specified key. The map should contain only JSON-compatible types (String, int, double, bool, List, Map, or null). If a value already exists for this key, it will be replaced.

Parameters:

  • key - The unique identifier for the JSON object.
  • value - The JSON object to store as a map with string keys and dynamic values.

Returns a Future that completes when the JSON object has been successfully stored.

Throws:

Implementation

Future<void> setJson(String key, Map<String, dynamic> value);