isFeatureAvailable static method

Future<bool> isFeatureAvailable()

A convenience method to check if the device currently supports Scribe stylus handwriting input.

Call this each time before calling startStylusHandwriting to make sure it's available.

This example shows using isFeatureAvailable to confirm that startStylusHandwriting can be called.
link
if (!await Scribe.isFeatureAvailable()) {
  // The device doesn't support stylus input right now, or maybe at all.
  return;
}

// Scribe is supported, so start it.
Scribe.startStylusHandwriting();

See also:

Implementation

static Future<bool> isFeatureAvailable() async {
  final bool? result = await _channel.invokeMethod<bool?>('Scribe.isFeatureAvailable');

  if (result == null) {
    throw FlutterError('MethodChannel.invokeMethod unexpectedly returned null.');
  }

  return result;
}