getWalletBalanceData method
Implementation
Future getWalletBalanceData(int partnerId) async {
await dio
.get(
"${ApiConstant.baseUrl}cpm-channel-partner-svc/account/balance/$partnerId",
)
.then((value) {
// print(value.data);
WalletResponse walletResponse = WalletResponse.fromJson(value.data);
Map<String, dynamic> data = {};
if (walletResponse != null) {
myWalletBalance.value =
walletResponse.response?.availableBalance ?? 0.0;
}
print(walletResponse);
}).catchError((onError) {
ConditionalLogs().customLog("$onError");
});
}