This commit is contained in:
Mohamed Nouffer
2022-05-18 19:09:26 +05:30
parent 80a976baa0
commit ee0440e6b6
26 changed files with 411 additions and 59 deletions

View File

@ -5,9 +5,12 @@ import 'package:http/http.dart' as http;
class CatService{
static Future<List<dynamic>?> loadCats() async {
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://localhost:8100/api/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://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',
@ -26,3 +29,7 @@ class CatService{
}