From 5e3de63a3ce0ca7891961e60c14a0f0e438e3784 Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Mon, 14 Mar 2022 13:14:15 +0530 Subject: [PATCH] update utf --- lib/pages/home/home_page.dart | 2 +- lib/services/location_service.dart | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index f1bc04f..b7da709 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -88,7 +88,7 @@ class HomePage extends GetView { ); }, leading: getImage(index), - title: Text(homeController.locations[0].collection[index].properties!['location_name']), + title: Text(homeController.locations[0].collection[index].properties!['location_name'].toString()), subtitle: Text(homeController.locations[0].collection[index].properties!['category']), ), ); diff --git a/lib/services/location_service.dart b/lib/services/location_service.dart index 4e92383..98087b1 100644 --- a/lib/services/location_service.dart +++ b/lib/services/location_service.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:geojson/geojson.dart'; import 'package:http/http.dart' as http; @@ -21,7 +23,7 @@ class LocationService{ // }); - return featuresFromGeoJson(response.body); + return featuresFromGeoJson(utf8.decode(response.bodyBytes)); // await geo.parse(response.body, verbose:true); // return fs;