WalletAmount method

Future WalletAmount({
  1. dynamic price,
})

Implementation

Future WalletAmount({price}) async {
  final ApiBody = {"module_id": "3", "price": price.toString()};
  var decodedResponse;
  try {
    final response = await http.post(
        Uri.parse('${SDK_BASE_URL}diagnostics_api/wallet'),
        body: ApiBody,
        headers: {
          "Authorization": SignUpController.currentUserToken,
        });
    decodedResponse = json.decode(response.body);
    return decodedResponse;
  } catch (e) {
    errorListner(
        apiname: 'diagnostics_api/wallet',
        responsed: "${decodedResponse}",
        request: "${ApiBody}",
        app_error: '${e}');
  }
}