DeviceSpecs class
Hardware specifications collected at runtime from the device.
Contains the number of CPU cores, total RAM, OS version, whether the device is an emulator, and an optional Android performance class.
Constructors
- DeviceSpecs({required DevicePlatform platform, required int? cpuCores, required int? ramMb, required int? osVersion, int? performanceClass, bool isEmulator = false})
Properties
- cpuCores → int?
-
Number of available CPU cores, or
nullif unavailable.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isEmulator → bool
-
Whether the device is an emulator/simulator.
final
- osVersion → int?
-
OS version number (e.g. Android API level or iOS major version).
final
- performanceClass → int?
-
Android 12+ media performance class, or
nullon older devices / iOS.final - platform → DevicePlatform
-
The platform (Android or iOS).
final
- ramMb → int?
-
Total device RAM in megabytes, or
nullif unavailable.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.
inherited