GameHaptics class
Plays the skin's haptics{style} requests. A request is ignored unless
hapticSensor is in the device sensors, unless allowed reports the
device/user allows haptics, or when it falls inside the throttle window.
Constructors
-
GameHaptics(List<
String> sensors, {bool allowed()?, int clock()?, required bool performFeedback(GameHapticStyle style)}) -
GameHaptics.platform(List<
String> sensors, {bool allowed()?}) -
Builds a GameHaptics that plays through the plugin (
gameHaptic).factory
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
-
play(
String style) → bool -
Plays
style. Returns true when feedback was performed; false when the style is unknown, haptics are off or not allowed, or the call fell inside the throttle window. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- hapticSensor → const String
- Sensor name gating haptics, per the web view contract.
- throttleMs → const int
- Minimum gap between two performed haptics.