|
|
|
|
@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/exception_report.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/utils.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
import 'package:http/http.dart' as http;
|
|
|
|
|
import 'package:logger/logger.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
@ -148,12 +149,14 @@ class BaseAppClient {
|
|
|
|
|
printEmojis: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
print("URL : $url");
|
|
|
|
|
logger.d("URL : $url");
|
|
|
|
|
print("Body : ${json.encode(body)}");
|
|
|
|
|
logger.d("Body : ${json.encode(body)}");
|
|
|
|
|
var asd = json.encode(body);
|
|
|
|
|
var asd2;
|
|
|
|
|
if (kDebugMode) {
|
|
|
|
|
print("URL : $url");
|
|
|
|
|
logger.d("URL : $url");
|
|
|
|
|
print("Body : ${json.encode(body)}");
|
|
|
|
|
logger.d("Body : ${json.encode(body)}");
|
|
|
|
|
var asd = json.encode(body);
|
|
|
|
|
var asd2;
|
|
|
|
|
}
|
|
|
|
|
if (await Utils.checkConnection()) {
|
|
|
|
|
final response = await http.post(Uri.parse(url), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
|
|
|
|
|
final int statusCode = response.statusCode;
|
|
|
|
|
@ -328,10 +331,12 @@ class BaseAppClient {
|
|
|
|
|
// body['DoctorID'] = 24; //3844083
|
|
|
|
|
// body['TokenID'] = "@dm!n";
|
|
|
|
|
|
|
|
|
|
print("URL : $url");
|
|
|
|
|
debugPrint("Body : ${json.encode(body)}", wrapWidth: 2048);
|
|
|
|
|
var asd = json.encode(body);
|
|
|
|
|
var asd2;
|
|
|
|
|
if (kDebugMode) {
|
|
|
|
|
print("URL : $url");
|
|
|
|
|
debugPrint("Body : ${json.encode(body)}", wrapWidth: 2048);
|
|
|
|
|
var asd = json.encode(body);
|
|
|
|
|
var asd2;
|
|
|
|
|
}
|
|
|
|
|
if (await Utils.checkConnection()) {
|
|
|
|
|
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
|
|
|
|
|
final int statusCode = response.statusCode;
|
|
|
|
|
|