putMap method

Future<void> putMap(
  1. String key,
  2. Map val, {
  3. bool isEncrypted = false,
})

Method to set map in local storage key -> Key for key-value pair isEncrypted -> Flag whether to encrypt or not val -> Value for key-value pair

Implementation

Future<void> putMap(String key, Map val, {bool isEncrypted = false}) async {
  await putString(key, jsonEncode(val),isEncrypted: isEncrypted);
}