service 2-5-26-1

This commit is contained in:
Hamza-Ayed
2026-05-02 15:12:46 +03:00
parent c3f29f30c1
commit 255724418c
25 changed files with 1063 additions and 530 deletions

View File

@@ -14,6 +14,9 @@ import '../../constant/api_key.dart';
import '../../constant/box_name.dart';
import '../../constant/colors.dart';
import '../../main.dart';
import 'package:service/controller/functions/encrypt_decrypt.dart';
import 'package:service/env/env.dart';
class ImageController extends GetxController {
File? myImage;
@@ -199,12 +202,13 @@ class ImageController extends GetxController {
length,
filename: basename(file.path),
);
String token = r(box.read(BoxName.jwt) ?? '').toString().split(Env.addd)[0];
request.headers.addAll({
'Cache-Control': 'no-cache, no-store, must-revalidate',
'Pragma': 'no-cache',
'Expires': '0',
'Authorization':
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
'Authorization': 'Bearer $token',
'X-Device-FP': box.read(BoxName.fingerPrint)?.toString() ?? '',
});
// Set the file name to the driverID
request.files.add(
@@ -292,9 +296,10 @@ class ImageController extends GetxController {
length,
filename: basename(file.path),
);
String token = r(box.read(BoxName.jwt) ?? '').toString().split(Env.addd)[0];
request.headers.addAll({
'Authorization':
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
'Authorization': 'Bearer $token',
'X-Device-FP': box.read(BoxName.fingerPrint)?.toString() ?? '',
});
// Set the file name to the driverID
request.files.add(