impsCharges method

Future<void> impsCharges(
  1. BuildContext context
)

Implementation

Future<void> impsCharges(BuildContext context) async {
  String bodyJson = jsonEncode({});

  auth.impsCharges(context,bodyJson).then((value) async {
    try {
      setCharges(value);
      if (impsChargesModel.value.charges!.isNotEmpty) {
        chargesList.clear();

        chargesList.addAll(impsChargesModel.value.charges!);
        update();
      } else {
        kglobal.shared.showSnack(
          context,
          true,
          validatePaymentModel.value.message.toString(),
        );
      }
    } on Exception catch (ex) {
      print(ex);
    }
  });
}