Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getdetailtsurvey_post.dart 724B

12345678910111213141516171819202122232425262728
  1. import 'dart:convert';
  2. import 'dart:core';
  3. import 'package:flutter/material.dart';
  4. import 'package:http/http.dart' as http;
  5. import 'package:tower_app/constants.dart';
  6. import 'dart:developer' as developer;
  7. import 'package:shared_preferences/shared_preferences.dart';
  8. class GetDetailSurvey_Post {
  9. late int id;
  10. GetDetailSurvey_Post({required this.id});
  11. static Future<String> connectToAPI(int id) async {
  12. String URL = baseURL + "/api/detail_survey";
  13. var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
  14. "id": id
  15. }), headers: {
  16. "Content-Type": "application/json",
  17. "Api-key": apiKey
  18. });
  19. //developer.log(sendData.body, name: "GET ALL");
  20. return sendData.body;
  21. }
  22. }