LocalAiUserActivationRequiredException class

Thrown by LocalAi.ensureReady() on the web when the model still has to be downloaded and the call did not run inside a user gesture.

Chrome only lets LanguageModel.create() start a download while the page has transient user activation (a click, a key press). Call ensureReady() from the button handler that asks for AI, not from initState or app start-up. status is LocalAiAvailability.downloadable: nothing is broken, and the same call succeeds from a gesture.

Inheritance

Properties

hashCode → int
The hash code for this object.
no setterinherited
message → String
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → LocalAiAvailability
finalinherited

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