update to add resume app from sleep
This commit is contained in:
@ -1,26 +1,25 @@
|
||||
|
||||
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 {
|
||||
static Future<Map<String, dynamic>> addTrack(String userId, double lat, double lon) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = '${server_url}/api/track/';
|
||||
print('++++++++${url}');
|
||||
final geom = '{"type": "MULTIPOINT", "coordinates": [[${lon}, ${lat}]]}';
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
String url = '$serverUrl/api/track/';
|
||||
print('++++++++$url');
|
||||
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,
|
||||
'user_id': userId,
|
||||
'geom': geom
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user