Nuevos cambios hechos de diseño

This commit is contained in:
ellecio2
2023-08-23 17:33:44 -04:00
parent 7a806f84ff
commit d2e9ba53ab
3485 changed files with 691106 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
import 'dart:convert';
import 'package:active_ecommerce_seller_app/app_config.dart';
import 'package:active_ecommerce_seller_app/data_model/common_response.dart';
import 'package:active_ecommerce_seller_app/data_model/withdraw_list_response.dart';
import 'package:active_ecommerce_seller_app/helpers/shared_value_helper.dart';
import 'package:http/http.dart' as http;
class WithdrawRepository{
Future<WithdrawListResponse> getList(int page)async{
Uri url = Uri.parse("${AppConfig.BASE_URL_WITH_PREFIX}/withdraw-request?page=$page");
Map<String,String> header={
"App-Language": app_language.$!,
"Authorization": "Bearer ${access_token.$}",
};
final response = await http.get(url, headers:header );
print("withdraw list "+response.body);
return withdrawListResponseFromJson(response.body);
}
Future<CommonResponse> sendWithdrawReq(String? message,String? amount)async{
Uri url = Uri.parse("${AppConfig.BASE_URL_WITH_PREFIX}/withdraw-request/store");
var post_body = jsonEncode({"amount": "$amount", "message": "$message"});
Map<String,String> header={
"App-Language": app_language.$!,
"Authorization": "Bearer ${access_token.$}",
"Content-Type": "application/json",
};
final response = await http.post(url, headers:header ,body: post_body);
print("withdraw list "+response.body);
return commonResponseFromJson(response.body);
}
}