fetchdetails method
Implementation
fetchdetails(BuildContext context) async {
Future.delayed(const Duration(milliseconds: 50), () {
loading(context);
});
var result = await diorequest().post(checmethod.toLowerCase(), {
'number': bvnController.text,
'identifier': identifier,
},publicKey,secretKey);
Navigator.pop(context);
if (result["success"] == 1) {
var image = result['data']['image'];
if (isUrl(image)) {
bvnimage = await urlToBase64(image);
} else {
// Assume it's already base64
bvnimage = image;
}
reference = result['data']["reference"];
if (captureimage.toString().isNotEmpty) {
compareimage(context);
}
} else {
stage = 2;
displaymessage = "Invalid $checmethod provided";
verificationstatus = 0;
}
}