sendData method
Implementation
Future<void> sendData(text, type) async {
try {
await platform
.invokeMethod('jsonData', {"isPasscodeSet": text, "type": type});
inChangePasscode = false;
} on PlatformException catch (e) {
if (kDebugMode) {
print('Error caught in sendData: $e');
}
}
}