WearOsPlugin class

Properties

hashCode int
The hash code for this object.
no setterinherited
keyEvents Stream<KeyData>?
get a stream of all key events, including the BACK button
no setter
lifecycleEvents Stream<String>?
get a stream of all key events, including the BACK button
no setter
methodChannel MethodChannel
final
motionEvents Stream<MotionData>
get a stream of all motion events, including the rotary events
no setter
registerForMotionEvents StreamController<MotionData>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

done() → void
close the rotary input stream
getAppVersion() Future<String?>
get the app version string
getManufacturer() Future<String?>
get the android device manufacturer name
getMeasurementSystem() Future<String?>
get the measurement system: SI, UK or US (SI is metrical system)
getModel() Future<String?>
get the android device model name
getPlatformSDK() Future<int?>
get the android platform SDK, for example 33 is Android 13
isScreenRound() Future<bool?>
true if the device is round, false if its rectangular/square, null for any errors
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAppAlpha(double alpha) Future<void>
set the transparency of the app, alpha has value of 0.0 (full transparent) to 1.0 (full opaque)
setKeepScreenOn(bool keepScreenOn) Future<void>
set the KeepScreenOn flag for this app
setScreenBrightness(double brightness, {Duration? timeout}) Future<void>
set the brightness of the app, brightness has value of 0.0 (low) to 1.0 (high) or -1.0 (use system default)
toString() String
A string representation of this object.
inherited
unregisterFromMotionEvents(StreamController<MotionData>? controller) → dynamic
vibrate({Duration duration = const Duration(milliseconds: 100), int amplitude = 100, String effect = ""}) Future<void>
vibrate with a given duration and amplitude, or with a given effect like 'click' (Android SDK 29+)

Operators

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

Static Properties

appVersion String?
getter/setter pair
instance WearOsPlugin
The method channel used to interact with the native platform.
getter/setter pair
manufacturer String?
getter/setter pair
model String?
getter/setter pair
platformSDK int?
getter/setter pair
screenRound bool?
getter/setter pair