isAvailable method

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

Checks if UPI payment processing is supported on the current platform/device.

Implementation

@override
Future<bool> isAvailable() async {
  try {
    final available = await methodChannel.invokeMethod<bool>('isAvailable');
    return available ?? false;
  } on PlatformException catch (e) {
    if (e.code == 'UNSUPPORTED_PLATFORM') {
      return false;
    }
    return false;
  }
}