IdleSource class abstract

A single way of reading the Idle duration — milliseconds since the user's last keyboard or mouse input — directly from the operating system.

Deliberately synchronous: an FFI call into the OS is a plain function call, so there is no await and therefore no resume point at which monitoring state could have changed underneath us. (That hazard is why the method-channel path needs the generation counter — see docs/agents/lessons.md.) The asynchronous FlutterInactiveTimerPlatform.getIdleDuration contract is preserved by the adapter, not by this type; see ADR-0003 and ADR-0004.

A source returns one already-computed value rather than raw clock readings, per ADR-0001 — the wraparound-prone subtraction stays on the side of the boundary where it is naturally correct.

Implementers

Constructors

IdleSource()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isSupported bool
Whether this source can actually read the OS on the current platform.
no setter
name String
Human-readable identifier, e.g. windows/GetLastInputInfo. Shown in the example's parity screen and used to label parity-test failures, so it must identify which binding a failure came from.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

idleMilliseconds() int
The Idle duration in milliseconds.
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