This commit is contained in:
erfan
2021-06-21 14:14:54 +04:30
parent 2c045f43f1
commit e2b8fab7d9
60 changed files with 4078 additions and 3928 deletions
+5 -4
View File
@@ -2,8 +2,9 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:cssd/config/urls.dart';
import 'package:cssd/config/user.dart';
import '../config/urls.dart';
import '../config/user.dart';
class Inputs with ChangeNotifier {
List<Map<String, dynamic>> inputItems = [];
@@ -22,7 +23,7 @@ class Inputs with ChangeNotifier {
// },
// );
var response = await http.post(
Url.getInputs,
Uri.parse(Url.getInputs),
body: {
'test_type_id': testTypeId,
'test_result_id': testResultId,
@@ -47,7 +48,7 @@ class Inputs with ChangeNotifier {
// }
Map<String, dynamic> values;
if (testResultId.isNotEmpty) {
response = await http.get(Url.testResultFormValues(testResultId),
response = await http.get(Uri.parse(Url.testResultFormValues(testResultId)),
headers: {'Authorization': User.token});
values = json.decode(response.body)['data'];
}