update
This commit is contained in:
@ -1,13 +1,16 @@
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:rogapp/utils/const.dart';
|
||||
|
||||
|
||||
class ActionService{
|
||||
|
||||
static Future<Map<String, dynamic>> makeAction(int user_id, int location_id, bool wanttogo, bool like, bool checkin) async {
|
||||
print("----- action is ---- ${like}-- ${wanttogo}-- ${checkin}");
|
||||
Map<String, dynamic> cats = {};
|
||||
//String url = "http://container.intranet.sumasen.net:8100/api/makeaction/?user_id=${user_id}&location_id=${location_id}&wanttogo=${wanttogo}&like=${like}&checkin=${checkin}";
|
||||
String url = "http://localhost:8100/api/makeaction/?user_id=${user_id}&location_id=${location_id}&wanttogo=${wanttogo}&like=${like}&checkin=${checkin}";
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = "${server_url}/api/makeaction/?user_id=${user_id}&location_id=${location_id}&wanttogo=${wanttogo}&like=${like}&checkin=${checkin}";
|
||||
//String url = "http://localhost:8100/api/makeaction/?user_id=${user_id}&location_id=${location_id}&wanttogo=${wanttogo}&like=${like}&checkin=${checkin}";
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -24,8 +27,9 @@ class ActionService{
|
||||
|
||||
static Future<List<dynamic>?> userAction(int user_id, int location_id) async {
|
||||
List<dynamic> cats = [];
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/useraction/?user_id=${user_id}&location_id=${location_id}';
|
||||
String url = 'http://localhost:8100/api/useraction/?user_id=${user_id}&location_id=${location_id}';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/useraction/?user_id=${user_id}&location_id=${location_id}';
|
||||
//String url = 'http://localhost:8100/api/useraction/?user_id=${user_id}&location_id=${location_id}';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../utils/const.dart';
|
||||
|
||||
|
||||
class AuthService{
|
||||
|
||||
static Future<Map<String, dynamic>> login(String email, String password) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/login/';
|
||||
String url = 'http://localhost:8100/api/login/';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/login/';
|
||||
//String url = 'http://localhost:8100/api/login/';
|
||||
final http.Response response = await http.post(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -28,8 +31,9 @@ class AuthService{
|
||||
|
||||
static Future<Map<String, dynamic>> register(String email, String password) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/register/';
|
||||
String url = 'http://localhost:8100/api/register/';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/register/';
|
||||
//String url = 'http://localhost:8100/api/register/';
|
||||
final http.Response response = await http.post(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -48,6 +52,30 @@ class AuthService{
|
||||
}
|
||||
|
||||
|
||||
static Future<List<dynamic>?> UserDetails(int userid) async {
|
||||
List<dynamic> cats = [];
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/userdetials?user_id=${userid}';
|
||||
//String url = 'http://localhost:8100/api/userdetials?user_id=${userid}';
|
||||
|
||||
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/cats/';
|
||||
print("---- cat url is ${url}");
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
|
||||
cats = json.decode(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,13 +2,16 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../utils/const.dart';
|
||||
|
||||
|
||||
class CatService{
|
||||
|
||||
static Future<List<dynamic>?> loadCats(double lat1, double lon1, double lat2, double lon2, double lat3, double lon3, double lat4, double lon4) async {
|
||||
List<dynamic> cats = [];
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/cats/?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
String url = 'http://localhost:8100/api/cats/?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/cats/?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
//String url = 'http://localhost:8100/api/cats/?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
|
||||
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/cats/';
|
||||
|
||||
@ -4,13 +4,16 @@ import 'package:flutter_polyline_points/flutter_polyline_points.dart';
|
||||
//import 'package:google_maps_webservice/directions.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../utils/const.dart';
|
||||
|
||||
|
||||
class DestinationService{
|
||||
|
||||
static Future<List<dynamic>> getDestinations(int user_id) async {
|
||||
List<dynamic> cats = [];
|
||||
//String url = "http://container.intranet.sumasen.net:8100/api/destinations/?user_id=${user_id}";
|
||||
String url = "http://localhost:8100/api/destinations/?user_id=${user_id}";
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = "${server_url}/api/destinations/?user_id=${user_id}";
|
||||
//String url = "http://localhost:8100/api/destinations/?user_id=${user_id}";
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -26,8 +29,9 @@ class DestinationService{
|
||||
|
||||
static Future<Map<String, dynamic>> deleteDestination(int dest_id) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
//String url = "http://container.intranet.sumasen.net:8100/api/delete_destination/?dest_id=${dest_id}";
|
||||
String url = "http://localhost:8100/api/delete_destination/?dest_id=${dest_id}";
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = "${server_url}/api/delete_destination/?dest_id=${dest_id}";
|
||||
//String url = "http://localhost:8100/api/delete_destination/?dest_id=${dest_id}";
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -44,8 +48,9 @@ class DestinationService{
|
||||
|
||||
static Future<int> updateOrder(int action_id, int order, String dir) async {
|
||||
int cats = 0;
|
||||
//String url = "http://container.intranet.sumasen.net:8100/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
String url = "http://localhost:8100/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = "${server_url}/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
//String url = "http://localhost:8100/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
|
||||
@ -1,14 +1,16 @@
|
||||
import 'package:geojson/geojson.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../utils/const.dart';
|
||||
|
||||
class LocationLineService{
|
||||
|
||||
static Future<GeoJsonFeature?> loadLocationLines() async {
|
||||
final geo = GeoJson();
|
||||
GeoJsonFeature? fs;
|
||||
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/location_line/';
|
||||
String url = 'http://localhost:8100/api/location_line/';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/location_line/';
|
||||
//String url = 'http://localhost:8100/api/location_line/';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
|
||||
@ -1,14 +1,17 @@
|
||||
import 'package:geojson/geojson.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../utils/const.dart';
|
||||
|
||||
class LocationPolygonervice{
|
||||
|
||||
static Future<GeoJsonFeature?> loadLocationLines() async {
|
||||
final geo = GeoJson();
|
||||
GeoJsonFeature? fs;
|
||||
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/location_polygon/';
|
||||
String url = 'http://localhost:8100/api/location_polygon/';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/location_polygon/';
|
||||
//String url = 'http://localhost:8100/api/location_polygon/';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
|
||||
@ -2,12 +2,14 @@ import 'dart:convert';
|
||||
|
||||
import 'package:geojson/geojson.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:rogapp/utils/const.dart';
|
||||
|
||||
class LocationService{
|
||||
|
||||
static Future<GeoJsonFeatureCollection?> loadLocations() async {
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/location/';
|
||||
String url = 'http://localhost:8100/api/location/';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/location/';
|
||||
//String url = 'http://localhost:8100/api/location/';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
@ -23,13 +25,14 @@ class LocationService{
|
||||
|
||||
static Future<GeoJsonFeatureCollection?> loadLocationsFor(String perfecture, String cat) async {
|
||||
String url = "";
|
||||
String server_url = ConstValues.currentServer();
|
||||
if(cat.isNotEmpty){
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/inperf/?perf=' + perfecture + '&cat=' + cat;
|
||||
url = 'http://localhost:8100/api/inperf/?perf=' + perfecture + '&cat=' + cat;
|
||||
url = '${server_url}/api/inperf/?perf=' + perfecture + '&cat=' + cat;
|
||||
//url = 'http://localhost:8100/api/inperf/?perf=' + perfecture + '&cat=' + cat;
|
||||
}
|
||||
else{
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/inperf/?perf=' + perfecture;
|
||||
url = 'http://localhost:8100/api/inperf/?perf=' + perfecture;
|
||||
url = '${server_url}/api/inperf/?perf=' + perfecture;
|
||||
//url = 'http://localhost:8100/api/inperf/?perf=' + perfecture;
|
||||
}
|
||||
//print("----- url ---- ${url} --- ${cat}");
|
||||
//String url = 'http://localhost:8100/api/inperf/?perf=' + perfecture + '&cat=' + cat;
|
||||
@ -50,14 +53,15 @@ class LocationService{
|
||||
|
||||
static Future<GeoJsonFeatureCollection?> loadLocationsSubFor(String subperfecture, String cat) async {
|
||||
String url = "";
|
||||
String server_url = ConstValues.currentServer();
|
||||
if(cat.isNotEmpty){
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/insubperf?subperf=' + subperfecture + '&cat=' + cat;
|
||||
url = 'http://localhost:8100/api/insubperf?subperf=' + subperfecture + '&cat=' + cat;
|
||||
url = '${server_url}/api/insubperf?subperf=' + subperfecture + '&cat=' + cat;
|
||||
//url = 'http://localhost:8100/api/insubperf?subperf=' + subperfecture + '&cat=' + cat;
|
||||
}
|
||||
else{
|
||||
print("------ loading location in sub----");
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/insubperf?subperf=' + subperfecture;
|
||||
url = 'http://localhost:8100/api/insubperf?subperf=' + subperfecture;
|
||||
url = '${server_url}/api/insubperf?subperf=' + subperfecture;
|
||||
//url = 'http://localhost:8100/api/insubperf?subperf=' + subperfecture;
|
||||
}
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -76,14 +80,15 @@ class LocationService{
|
||||
|
||||
static Future<GeoJsonFeatureCollection?> loadLocationsBound(double lat1, double lon1, double lat2, double lon2, double lat3, double lon3, double lat4, double lon4, String cat) async {
|
||||
String url = "";
|
||||
String server_url = ConstValues.currentServer();
|
||||
print("cat is ----- ${cat}");
|
||||
if(cat.isNotEmpty){
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat;
|
||||
url = 'http://localhost:8100/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat;
|
||||
url = '${server_url}/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat;
|
||||
//url = 'http://localhost:8100/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat;
|
||||
}
|
||||
else{
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
url = 'http://localhost:8100/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
url = '${server_url}/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
//url = 'http://localhost:8100/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
|
||||
}
|
||||
print("----url --- ${url}");
|
||||
final response = await http.get(Uri.parse(url),
|
||||
@ -109,16 +114,17 @@ class LocationService{
|
||||
}
|
||||
|
||||
|
||||
static Future<GeoJsonFeatureCollection?> loadCustomLocations(String cat) async {
|
||||
static Future<GeoJsonFeatureCollection?> loadCustomLocations(String name, String cat) async {
|
||||
String url = "";
|
||||
String server_url = ConstValues.currentServer();
|
||||
print("cat is ----- ${cat}");
|
||||
if(cat.isNotEmpty){
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/custom_area/?&cat=' + cat;
|
||||
url = 'http://localhost:8100/api/custom_area/?&cat=' + cat;
|
||||
url = '${server_url}/api/custom_area/?&cat=' + cat;
|
||||
//url = 'http://localhost:8100/api/customarea?name=${name}&cat=' + cat;
|
||||
}
|
||||
else{
|
||||
//url = 'http://container.intranet.sumasen.net:8100/api/custom_area/';
|
||||
url = 'http://localhost:8100/api/custom_area/';
|
||||
url = '${server_url}/api/customarea?name=${name}&';
|
||||
//url = 'http://localhost:8100/api/customarea?name=${name}&';
|
||||
}
|
||||
print("----url --- ${url}");
|
||||
final response = await http.get(Uri.parse(url),
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:rogapp/utils/const.dart';
|
||||
|
||||
|
||||
class PerfectureService{
|
||||
|
||||
static Future<List<dynamic>?> loadPerfectures() async {
|
||||
List<dynamic> perfs = [];
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/perf_main/';
|
||||
String url = 'http://localhost:8100/api/perf_main/';
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/perf_main/';
|
||||
//String url = 'http://localhost:8100/api/perf_main/';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
@ -23,8 +25,9 @@ class PerfectureService{
|
||||
|
||||
static Future<List<dynamic>?> loadSubPerfectures(String area) async {
|
||||
List<dynamic> perfs = [];
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/subperfinmain/?perf=' + sub;
|
||||
String url = 'http://localhost:8100/api/subperfinmain/?area=' + area;
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/subperfinmain/?area=' + area;
|
||||
//String url = 'http://localhost:8100/api/subperfinmain/?area=' + area;
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
@ -41,8 +44,9 @@ class PerfectureService{
|
||||
|
||||
static Future<List<dynamic>?> getMainPerfExt(String id) async {
|
||||
List<dynamic> perfs = [];
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/mainperfext/?perf=' + id;
|
||||
String url = 'http://localhost:8100/api/mainperfext/?perf=' + id;
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/mainperfext/?perf=' + id;
|
||||
//String url = 'http://localhost:8100/api/mainperfext/?perf=' + id;
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
@ -58,8 +62,27 @@ class PerfectureService{
|
||||
|
||||
static Future<List<dynamic>?> loadGifuAreas(String perf) async {
|
||||
List<dynamic> perfs = [];
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/allgifuareas/?perf' + perf;
|
||||
String url = 'http://localhost:8100/api/allgifuareas/?perf=' + perf;
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/allgifuareas/?perf=' + perf;
|
||||
//String url = 'http://localhost:8100/api/allgifuareas/?perf=' + perf;
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
|
||||
perfs = json.decode(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
return perfs;
|
||||
}
|
||||
|
||||
static Future<List<dynamic>?> loadCustomAreas() async {
|
||||
List<dynamic> perfs = [];
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/customareanames';
|
||||
//String url = 'http://localhost:8100/api/customareanames';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
@ -76,8 +99,9 @@ class PerfectureService{
|
||||
|
||||
static Future<List<dynamic>?> getSubExt(String id) async {
|
||||
List<dynamic> perfs = [];
|
||||
//String url = 'http://container.intranet.sumasen.net:8100/api/perfext/?sub_perf=' + id;
|
||||
String url = 'http://localhost:8100/api/perfext/?sub_perf=' + id;
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/perfext/?sub_perf=' + id;
|
||||
//String url = 'http://localhost:8100/api/perfext/?sub_perf=' + id;
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
|
||||
34
lib/services/reacking_service.dart
Normal file
34
lib/services/reacking_service.dart
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:rogapp/utils/const.dart';
|
||||
|
||||
|
||||
class TrackingService {
|
||||
|
||||
static Future<Map<String, dynamic>> addTrack(String user_id, double lat, double lon) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/track/';
|
||||
//String url = 'http://localhost:8100/api/track/';
|
||||
final geom = '{"type": "MULTIPOINT", "coordinates": [[${lon}, ${lat}]]}';
|
||||
final http.Response response = await http.post(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
body: jsonEncode(<String, String>{
|
||||
'user_id': user_id,
|
||||
'geom': geom
|
||||
}),
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
cats = json.decode(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
return cats;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user