jsonToObj static method

Poi jsonToObj(
  1. Map<String, dynamic> json
)

The function jsonToObj takes a JSON object and returns a Poi object with the corresponding properties. @param {Map<String, dynamic>} json - A map containing key-value pairs where the keys are strings and the values can be of any type. @returns an instance of the Poi class.

Implementation

static Poi jsonToObj(Map<String, dynamic> json) {
  try {
    return Poi.named(
        jsonData: json['jsondata']!,
        city: json['city'],
        idstore: json['idstore']!,
        name: json['name']!,
        date: json['date']!,
        distance: json['distance']!,
        duration: json['duration']!,
        latitude: json['latitude']!,
        locationid: json['locationid']!,
        longitude: json['longitude']!,
        zipcode: json['zipcode'],
        radius: json['radius']!,
        address: json['address'],
        countrycode: json['countrycode'],
        tags: json['tags'],
        types: json['types'],
        contact: json['contact'],
        userProperties: json['userProperties']!);
  } catch (e) {
    rethrow;
  }
}