updateOrg method
- String code
Updates the organization based on the scanned code.
code
is the scanned code.
Implementation
updateOrg(String code) async {
//String cameraScanResult = code ;//await scanner.scanPhoto();
if (code.isEmpty) {
setState(() {
isEditOrg = false;
});
return;
}
if (code.contains("CMFETO")) {
//cameraScanResult = cameraScanResult.replaceAll("FETOSENSE:", "");
//String result = utf8.decode(base64.decode(cameraScanResult));
getDevice(code);
} else {
setState(() {
isEditOrg = false;
});
Fluttertoast.showToast(
msg: 'Invalid code', toastLength: Toast.LENGTH_LONG);
}
}