isModelAvailable method

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

Checks if the ML model is available on Android. Always returns true on iOS (model is bundled with the system).

Implementation

@override
Future<bool> isModelAvailable() async {
  // iOS Vision framework is built-in, always available
  if (Platform.isIOS) return true;

  try {
    final result = await methodChannel.invokeMethod<bool>('isModelAvailable');
    return result ?? false;
  } on PlatformException {
    return false;
  }
}