hasStrings method Null safety

Future<bool> hasStrings()

Returns a future that resolves to true iff the clipboard contains string data.

See also:

Implementation

static Future<bool> hasStrings() async {
  final Map<String, dynamic>? result = await SystemChannels.platform.invokeMethod(
    'Clipboard.hasStrings',
    Clipboard.kTextPlain,
  );
  if (result == null) {
    return false;
  }
  return result['value'] as bool;
}