deserialize method

T deserialize(
  1. String? str
)

desrialize str to an obj of type T for shared preferences.

Implementation

T deserialize(String? str) {
  if (customDecode == null) {
    return jsonDecode(str!) as T;
  } else {
    return customDecode!(str);
  }
}