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; import 'package:shared_preferences/shared_preferences.dart'; class GetDetailSurvey_Post { late int id; GetDetailSurvey_Post({required this.id}); static Future connectToAPI(int id) async { String URL = baseURL + "/api/detail_survey"; var sendData = await http.post(Uri.parse(URL), body: jsonEncode({ "id": id }), headers: { "Content-Type": "application/json", "Api-key": apiKey }); //developer.log(sendData.body, name: "GET ALL"); return sendData.body; } }