AlanVoice class
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
getter/setter pair
-
callbacks
↔ Set<
CommandCallbackFunction> -
getter/setter pair
-
eventCallbacks
↔ Set<
EventCallbackFunction> -
getter/setter pair
-
onButtonState
↔ Set<
OnButtonStateCallback> -
getter/setter pair
-
onCommand
↔ Set<
OnCommandCallback> -
getter/setter pair
-
onEvent
↔ Set<
OnEventCallback> -
getter/setter pair
-
version
→ Future<
String> -
Print Alan SDK version info
no setter
Static Methods
-
activate(
) → void - Activate Alan button
-
addButton(
String projectId, {String? authJson, String? server, int buttonAlign = BUTTON_ALIGN_RIGHT, int topMargin = 0, int bottomMargin = 20}) → void - Inits SDK, connect to the script side and show Alan button
-
addConnectionCallback(
ConnectionStateCallback connectionCallback) → void -
callProjectApi(
String method, String args) → Future< ScriptCallback> - Call script function by name arguments: method - script side method name args - arguments serialized to a json string
-
clearCallbacks(
) → void -
deactivate(
) → void - Deactivate Alan button
-
getWakewordEnabled(
) → Future< bool> - Returns true if Alan Button wake word is enabled False otherwise
-
hideButton(
) → void - Hide Alan button
-
init(
) → void -
isActive(
) → Future< bool> -
Returns true if Alan Button is Active
(activated by
activate
method or pressed by user) False otherwise -
playCommand(
String command) → Future< ScriptCallback> - Sends command to a script arguments: command - command name
-
playText(
String text) → void - Plays text arguments: text - given text string
-
removeButton(
) → void - Remove Alan button
-
removeConnectionCallback(
ConnectionStateCallback connectionCallback) → void -
sendText(
String text) → void - Sends text arguments: text - given text string
-
setLogLevel(
String logLevel) → void - Set AlanSDK log level
-
setVisualState(
String visuals) → void - Set script visuals. visuals argument should be a valid json
-
setWakewordEnabled(
bool enabled) → void - Set Alan Button wake word enabled/disabled
-
showButton(
) → void - Show Alan button
Constants
- BUTTON_ALIGN_LEFT → const int
- BUTTON_ALIGN_RIGHT → const int
- PLUGIN_VERSION → const String