storedGeoLocation property Null safety

List<Map<String, dynamic>> storedGeoLocation

Get stored location from shared preferences

Implementation

List<Map<String, dynamic>> get storedGeoLocation {
  var list = shared.getStringList("stored_location");
  if (list?.isNotEmpty ?? false) {
    return list!.map((e) => Map<String, dynamic>.from(jsonDecode(e))).toList();
  } else {
    return [];
  }
}