Frame class

Constructors

Frame()

Properties

bluetooth BrilliantDevice
Gets the connected Bluetooth device.
no setter
camera Camera
latefinal
display Display
latefinal
files Files
latefinal
hashCode int
The hash code for this object.
no setterinherited
isConnected bool
Checks if the device is connected.
no setter
logger → Logger
final
microphone Microphone
latefinal
motion Motion
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timesToRetry int
getter/setter pair
useLibrary bool
getter/setter pair

Methods

connect({Duration? timeout = const Duration(seconds: 30)}) Future<bool>
Connects to the nearest Frame device.
connectToDevice(String deviceId) Future<bool>
Connects to a specific Frame device.
connectToExistingBleDevice(BluetoothDevice btdevice) Future<bool>
delay(Duration duration) Future<void>
Delays execution on Frame for a given duration. Technically this sends a sleep command, but it doesn't actually change the power mode. This function does not block, returning immediately.
disconnect() Future<void>
Disconnects from the Frame device.
ensureConnected() Future<void>
Ensures the Frame device is connected, establishing a connection if not.
escapeLuaString(String string) String
Escapes a string for use in Lua.
evaluate(String luaExpression) Future<String>
Evaluates a Lua expression on the device and returns the result.
getBatteryLevel() Future<int>
Returns the battery level as a percentage between 1 and 100.
getCharCodeFromStringAtPos(String string, int pos) int
Gets the character code from a string at the specified position.
getPlatformVersion() Future<String?>
Gets the platform version.
injectAllLibraryFunctions() Future<void>
Injects all library functions into the global environment of the device.
injectLibraryFunction(String name, String function, String version) Future<void>
Injects a function into the global environment of the device. Used to push helper library functions to the device.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runLua(String luaString, {bool awaitPrint = false, bool checked = false, Duration? timeout, bool withoutHelpers = false}) Future<String?>
Runs a Lua string on the device.
runOnWake({String? luaScript, void callback()?}) Future<void>
Runs a Lua function when the device wakes up from sleep. Can include Lua code to be run on Frame upon wake and/or a Dart callback to be run locally upon wake.
sendLongLua(String string, {bool awaitPrint = false, bool checked = false, Duration? timeout}) Future<String?>
Sends a Lua string to the device that is longer than the MTU limit.
setTimeOnFrame({bool checked = false}) Future<void>
Sets the time on the Frame device.
sleep([bool deep = false]) Future<void>
Puts the Frame into sleep mode. There are two modes: normal and deep.
stayAwake(bool value) Future<void>
Prevents Frame from going to sleep while it's docked onto the charging cradle. This can help during development where continuous power is needed, however may degrade the display or cause burn-in if used for extended periods of time.
toString() String
A string representation of this object.
inherited

Operators

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