read method

Map<String, dynamic> read(
  1. String key
)

Implementation

Map<String, dynamic> read(String key) {
  var value = prefrences.getString(key);
  if (value == null) return {};
  var decoded = <String, dynamic>{};
  try {
    decoded = jsonDecode(value);
  } catch (err) {
    debugPrint(err.toString());
  }
  return decoded;
}