added goal feature

This commit is contained in:
Mohamed Nouffer
2022-10-12 21:46:17 +05:30
parent 0470e1f27f
commit 8e30ee6ba7
29 changed files with 876 additions and 481 deletions

View File

@ -5,6 +5,27 @@ import 'package:rogapp/utils/const.dart';
class ActionService{
static Future<Map<String, dynamic>> postCheckin(String cp_num, String team_name) async{
Map<String, dynamic> checkin_res = {};
String url = 'https://natnats.mobilous.com/post_from_rogapp_ogaki';
//print('---- toekn is ${token} -----');
final http.Response response = await http.post(
Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
body: jsonEncode(<String, String>{
'team_name': team_name,
'cp_number': cp_num.toString()
}),
);
if (response.statusCode == 200) {
checkin_res = json.decode(utf8.decode(response.bodyBytes));
}
return checkin_res;
}
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 = {};