sendData method

Future<void> sendData(
  1. dynamic text,
  2. dynamic type
)

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');
    }
  }
}