NativeAiCapabilities class

What the on-device model can do on the current device.

available is false when the OS is too old, the device is not eligible, Apple Intelligence is off, or the model is still downloading. code then carries the reason (DEVICE_NOT_ELIGIBLE, APPLE_INTELLIGENCE_NOT_ENABLED, MODEL_NOT_READY, UNSUPPORTED_OS_VERSION, UNSUPPORTED_PLATFORM).

Constructors

NativeAiCapabilities({required bool available, String? code, String? reason, bool vision = false, bool supportsCurrentLocale = false, List<String> supportedLanguages = const []})
const
NativeAiCapabilities.fromMap(Map map)
factory

Properties

available → bool
final
code → String?
final
hashCode → int
The hash code for this object.
no setterinherited
reason → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportedLanguages → List<String>
final
supportsCurrentLocale → bool
Whether the device's current locale is one the model supports.
final
vision → bool
Whether image attachments can be passed to generateStructured (iOS 27 and later, on models with vision support).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited