postdetails method

dynamic postdetails(
  1. dynamic context
)

Implementation

postdetails(context) async {
  // loader(context, "Loading");
  var result = await diorequest().put(checmethod.toLowerCase(), {
    'number': bvnController.text,
    'reference': reference,
    'confidence': score.toInt(),
    'image': captureimage,
  });
  Navigator.pop(context);
  if (result["success"] == 1) {
    stage = 2;
    timer?.cancel();
    enrollmentdata = result["data"];
    displaymessage =
        score > 50
            ? 'We have verified that the ID belongs to you($enrollmentdata). Thanks for your cooperation.'
            : "Your face did not match the $checmethod provided";
    verificationstatus = score > 50 ? 2 : 1;
  } else {
    displaymessage = "connection Error";
    stage = 2;
    verificationstatus = 0;
  }
}