isAvailable method

Future<bool> isAvailable()

Checks if the blocking API is available. Never throws - always returns true or false.

Implementation

Future<bool> isAvailable() async {
  if (!Platform.isAndroid) {
    return false;
  }
  try {
    final result = await _channel.invokeMethod<bool>(
      'blockedNumbers.isAvailable',
    );
    return result ?? false;
  } catch (e) {
    // If checking availability throws, return false instead of propagating the error
    return false;
  }
}