isCashDrawerOpen method

  1. @override
Future<bool> isCashDrawerOpen(
  1. String printerId
)
override

Implementation

@override
Future<bool> isCashDrawerOpen(String printerId) async {
  final result = await methodChannel.invokeMethod<bool>(
      'isCashDrawerOpen', <String, dynamic>{'printerId': printerId});
  if (result == null) {
    throw PlatformException(
      code: 'UNKNOWN',
      message: 'Unable to determine if cash drawer is open.',
    );
  }
  return result;
}