Bez popisu
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.

navigate_post.dart 839B

12345678910111213141516171819202122232425262728293031323334
  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:employee_selfservice_mobile/constants.dart';
  6. import 'dart:developer' as developer;
  7. import 'package:shared_preferences/shared_preferences.dart';
  8. class Navigate_Post {
  9. late String id;
  10. late int user_id;
  11. Navigate_Post({required this.id});
  12. static Future<String> connectToAPI(String id, int user_id) async {
  13. String URL = baseURL + "/api/navigate";
  14. var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
  15. "data": [
  16. {
  17. "id": id,
  18. "user_id":user_id
  19. }
  20. ]
  21. }), headers: {
  22. "Content-Type": "application/json",
  23. "Api-key": apiKey
  24. });
  25. //developer.log(sendData.body, name: "GET ALL");
  26. return sendData.body;
  27. }
  28. }