isSupported method

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

Returns true if the platform side responds to method calls.

Used to check if a native implementation is available.

Implementation

@override
Future<bool> isSupported() async {
  try {
    await _channel.invokeMethod('getDeviceTrustReport');
    return true;
  } on MissingPluginException {
    return false;
  } on PlatformException {
    // Platform present but returned an error — still supported.
    return true;
  } catch (_) {
    return false;
  }
}