DeviceStatus class

A snapshot of current device health reported by the native platform.

Delivered periodically via the status stream and used by the pool manager to adjust concurrency, pause preloading, or trigger emergency disposal of player instances.

Annotations

Constructors

DeviceStatus({required ThermalLevel thermalLevel, required int availableMemoryBytes, required MemoryPressureLevel memoryPressureLevel, required double batteryLevel, required bool isLowPowerMode})
Creates a new DeviceStatus.
const
DeviceStatus.fromMap(Map<String, dynamic> map)
Creates a DeviceStatus from a platform channel map.
factory

Properties

availableMemoryBytes int
Available (free) memory in bytes.
final
batteryLevel double
Battery level from 0.0 (empty) to 1.0 (full).
final
hashCode int
The hash code for this object.
no setteroverride
isLowPowerMode bool
Whether the device is in low-power / battery-saver mode.
final
memoryPressureLevel MemoryPressureLevel
Categorized memory pressure level.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thermalLevel ThermalLevel
Current thermal level of the device.
final

Methods

copyWith({ThermalLevel? thermalLevel, int? availableMemoryBytes, MemoryPressureLevel? memoryPressureLevel, double? batteryLevel, bool? isLowPowerMode}) DeviceStatus
Creates a copy of this DeviceStatus with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts this to a platform channel map.
toString() String
A string representation of this object.
override

Operators

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