You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.9 KiB
Dart
48 lines
1.9 KiB
Dart
// import 'dart:async';
|
|
//
|
|
// import 'package:car_customer_app/classes/app_state.dart';
|
|
// import 'package:car_customer_app/classes/consts.dart';
|
|
// import 'package:car_customer_app/config/dependencies.dart';
|
|
// import 'package:car_customer_app/models/m_response.dart';
|
|
// import 'package:car_customer_app/models/profile/document.dart';
|
|
// import 'package:flutter/cupertino.dart';
|
|
//
|
|
// import '../api_client.dart';
|
|
//
|
|
// class ProfileApiClient {
|
|
// static final ProfileApiClient _instance = ProfileApiClient._internal();
|
|
//
|
|
// ProfileApiClient._internal();
|
|
//
|
|
// factory ProfileApiClient() => _instance;
|
|
//
|
|
// Future<Document> getServiceProviderDocument(dynamic userId) async {
|
|
// var queryParameters = {
|
|
// "ServiceProviderID": userId.toString(),
|
|
// };
|
|
// String? token = AppState().getUser.data?.accessToken;
|
|
// debugPrint(token);
|
|
// return await injector.get<ApiClient>().getJsonForObject((json) => Document.fromJson(json), ApiConsts.GetProviderDocument, queryParameters: queryParameters, token: AppState().getUser.data!.accessToken ?? "");
|
|
// }
|
|
//
|
|
// Future<MResponse> serviceProviderDocumentsUpdate(List<DocumentData>? documents) async {
|
|
// List<Map<String, dynamic>> map = [];
|
|
// for (int i = 0; i < documents!.length; i++) {
|
|
// if (documents[i].document != null) {
|
|
// var postParams = {
|
|
// "id": documents[i].id,
|
|
// "serviceProviderID": documents[i].serviceProviderId,
|
|
// "documentID": documents[i].documentId,
|
|
// "documentExt": documents[i].fileExt,
|
|
// "documentImage": documents[i].document,
|
|
// "isActive": true
|
|
// };
|
|
// map.add(postParams);
|
|
// }
|
|
// }
|
|
// String t = AppState().getUser.data!.accessToken ?? "";
|
|
// debugPrint("token " + t);
|
|
// return await injector.get<ApiClient>().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.ServiceProviderDocument_Update, map, token: t);
|
|
// }
|
|
// }
|