DeviceStatus class

Live connectivity + power reading.

Constructors

DeviceStatus({ConnectivityState connectivity = ConnectivityState.unknown, bool metered = false, double? batteryLevel, BatteryState battery = BatteryState.unknown})
const

Properties

battery BatteryState
Charging state.
final
batteryLevel double?
Battery charge fraction 0..1; null when unknown/unreadable.
final
connectivity ConnectivityState
Current connectivity.
final
hashCode int
The hash code for this object.
no setteroverride
isOnline bool
Whether the device is online per connectivity.
no setter
metered bool
Whether the network is metered (cellular/hotspot).
final
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.
override