app_settings_ai 0.1.0
app_settings_ai: ^0.1.0 copied to clipboard
On-device AI settings proposals for the app_settings plugin. Apple Foundation Models on iOS, Gemini Nano on Android. Free and MIT licensed.
0.1.0 #
- Initial release. Companion package to
app_settingsthat turns a natural-language request into a ranked list of settings screens to open, using an on-device model. Free and MIT licensed. AppSettingsAI.availability(),AppSettingsAI.prepareModel()andAppSettingsAI.proposeSettings().- iOS 26+: Apple Foundation Models with guided generation, so the response structure is guaranteed.
FoundationModelsis weak-linked, so the plugin still loads on systems without it, which reportunsupportedOsVersionrather than failing to launch. The effective floor is iOS 15, the minimum deployment target the iOS 27 SDK in Xcode 26 accepts;Package.swiftdeclares.iOS("13.0")for older toolchains. Requires Xcode 26+ to build the real implementation. - Android: ML Kit GenAI Prompt API (Gemini Nano).
genai-promptrequires API 26, but this plugin keepsminSdk 16and reportsunsupportedOsVersionbelow that, so apps with a lowerminSdkcan adopt it and degrade gracefully. proposeSettings()never throws: an ineligible device yields anunavailableresult and a failed generation anerrorone, including when the plugin is not registered. Both native handlers check capability before generating, so Dart does not spend a round trip pre-checking it.- Both platforms receive identical instructions and prompt, built in Dart. All validation — unknown and duplicate setting keys, confidence clamping, ordering and the proposal cap — happens once in Dart, so the two platforms are held to the same rules.