isHapticsMuted method

  1. @override
Future<bool> isHapticsMuted()
override

Implementation

@override
Future<bool> isHapticsMuted() {
  if (defaultTargetPlatform != TargetPlatform.iOS) {
    throw UnimplementedError('isHapticsMuted() is only implemented on iOS.');
  }
  return methodChannel.invokeMethod<bool>('isHapticsMuted').then((value) {
    if (value == null) {
      throw PlatformException(
        code: 'NULL_HAPTICS_MUTED',
        message: 'Received null value for isHapticsMuted from platform.',
      );
    }
    return value;
  });
}