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.
58 lines
2.8 KiB
Dart
58 lines
2.8 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/branch.dart';
|
|
// import 'package:car_customer_app/models/profile/categroy.dart';
|
|
// import 'package:car_customer_app/models/profile/services.dart';
|
|
//
|
|
// import '../api_client.dart';
|
|
//
|
|
// class BranchApiClient {
|
|
//
|
|
// Future<MResponse> createBranch(String branchName, String branchDescription, String cityId, String address, String latitude, String longitude) async {
|
|
// var postParams = {
|
|
// // "id": 0,
|
|
// "serviceProviderID": AppState().getUser.data?.userInfo?.providerId ?? "",
|
|
// "branchName": branchName,
|
|
// "branchDescription": branchDescription,
|
|
// "cityID": cityId,
|
|
// "address": address,
|
|
// "latitude": latitude,
|
|
// "longitude": longitude,
|
|
// "isActive": true
|
|
// };
|
|
// String t = AppState().getUser.data!.accessToken ?? "";
|
|
// print("tokeen " + t);
|
|
// return await injector.get<ApiClient>().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.createProviderBranch, postParams, token: t);
|
|
// }
|
|
//
|
|
// Future<Branch> fetchAllBranches() async {
|
|
// var postParams = {"ServiceProviderID": AppState().getUser.data?.userInfo?.providerId.toString() ?? ""};
|
|
// String t = AppState().getUser.data!.accessToken ?? "";
|
|
// print("tokeen " + t);
|
|
// return await injector.get<ApiClient>().getJsonForObject((json) => Branch.fromJson(json), ApiConsts.ServiceProviderBranchGet, queryParameters: postParams, token: t);
|
|
// }
|
|
//
|
|
// Future<Category> fetchBranchCategory() async {
|
|
// var postParams = {"ServiceProviderID": AppState().getUser.data?.userInfo?.providerId.toString() ?? ""};
|
|
// String t = AppState().getUser.data!.accessToken ?? "";
|
|
// print("tokeen " + t);
|
|
// return await injector.get<ApiClient>().getJsonForObject((json) => Category.fromJson(json), ApiConsts.ServiceCategory_Get, queryParameters: postParams, token: t);
|
|
// }
|
|
//
|
|
// Future<Services> fetchServices(String serviceCategoryId) async {
|
|
// var postParams = {"ServiceCategoryID": serviceCategoryId};
|
|
// String t = AppState().getUser.data!.accessToken ?? "";
|
|
// print("tokeen " + t);
|
|
// return await injector.get<ApiClient>().getJsonForObject((json) => Services.fromJson(json), ApiConsts.Services_Get, queryParameters: postParams, token: t);
|
|
// }
|
|
//
|
|
// Future<MResponse> createService(List<Map<String, dynamic>> map) async {
|
|
// String t = AppState().getUser.data!.accessToken ?? "";
|
|
// return await injector.get<ApiClient>().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.ServiceProviderService_Create, map, token: t);
|
|
// }
|
|
// }
|