import 'dart:convert'; import 'dart:core'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:tower_app/constants.dart'; import 'dart:developer' as developer; class UpdateGPS_Post { late String id; late String map; late int user_id; UpdateGPS_Post({required this.id}); static Future connectToAPI(String id, String map, int user_id) async { String URL = baseURL + "/api/update_gps"; var sendData = await http.post(Uri.parse(URL), body: jsonEncode({ "data": [ { "id": id, "map": map, "user_id": user_id } ] }), headers: { "Content-Type": "application/json", "Api-key": apiKey }); //developer.log(sendData.body, name: "GET ALL"); return sendData.body; } }