UDeviceStatus class
Values that change while the app runs; read with UDevice.status.
- Annotations
Constructors
- UDeviceStatus({int? batteryLevel, UBatteryState batteryState = UBatteryState.unknown, bool? powerSaveMode, UThermalState thermalState = UThermalState.unknown, int? freeMemory, int? totalMemory, int? freeDisk, int? totalDisk, Duration? uptime})
-
const
-
UDeviceStatus.fromMap(Map<
String, Object?> m) -
Reads it from the native map.
factory
Properties
- batteryLevel → int?
-
0–100, null when there is no battery or it cannot be read.
final
- batteryState → UBatteryState
-
Charging state.
final
- freeDisk → int?
-
Free disk in bytes.
final
- freeMemory → int?
-
Bytes. Memory is system-wide; disk is the volume holding the app's data.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCharging → bool
-
True when charging or full.
no setter
- isLowBattery → bool
-
True at 15% or less and not charging.
no setter
- powerSaveMode → bool?
-
Battery Saver / Low Power Mode / Windows energy saver.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldSaveEnergy → bool
-
Low power, low battery or a hot device: a good moment to skip heavy background work.
no setter
- thermalState → UThermalState
-
Heat level.
final
- totalDisk → int?
-
Total disk in bytes.
final
- totalMemory → int?
-
Total RAM in bytes.
final
- uptime → Duration?
-
Time since boot.
final
Methods
-
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