getLastReturnCode method

Future<int> getLastReturnCode()

Returns return code of the last executed command.

Implementation

Future<int> getLastReturnCode() async {
  try {
    final Map<dynamic, dynamic> result =
        await _methodChannel.invokeMethod('getLastReturnCode');
    return result['lastRc'];
  } on PlatformException catch (e, stack) {
    print("Plugin getLastReturnCode error: ${e.message}");
    return Future.error("getLastReturnCode failed.", stack);
  }
}