getRecentOperatingHandStatus method

  1. @override
void getRecentOperatingHandStatus(
  1. GetRecentOperatingHandStatusOptions options
)
override

查询最近一次操作手状态

Implementation

@override
void getRecentOperatingHandStatus(
  GetRecentOperatingHandStatusOptions options,
) {
  methodChannel
      .invokeMethod<int>('getRecentOperatingHandStatus')
      .then((code) {
        options.onSuccess(
          code is int
              ? OperatingHandStatus.fromCode(code)
              : OperatingHandStatus.unknown,
        );
        options.complete?.call('getRecentOperatingHandStatus:ok');
      })
      .catchError((Object error, StackTrace stackTrace) {
        final errMsg = _errorMessage(
          error,
          'getRecentOperatingHandStatus:fail',
        );
        options.fail?.call(errMsg);
        options.complete?.call(errMsg);
      });
}