-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I live in Dubai.. so the results are default not in english. Plus some of the address fields come back as Null.. causing a String error. This will fix that in GBData.dart
factory Address.fromJson(Map<String, dynamic> json) => Address(
road: json['road'] ?? "",
village: json["village"] ?? "",
county: json["county"] ?? "",
stateDistrict: json["state_district"] ?? "",
state: json["state"] ?? "",
iso31662Lvl4: json["ISO3166-2-lvl4"] ?? "",
postcode: json["postcode"] ?? "",
country: json["country"] ?? "",
countryCode: json["country_code"] ?? "",
);
To fix the lang... you can add a &accept-language=en
var request = http.Request(
'GET',
Uri.parse(
'$PATH/reverse?lat=${pos.latitude}&lon=${pos.longitude}&accept-language=en&format=jsonv2'));
jtmuller5, anton-roos and NeKoFu
Metadata
Metadata
Assignees
Labels
No labels