PowerProfile class

Cross-platform policy for scan, connection, and PHY power behavior.

Android can apply scan mode, connection priority, and PHY directly when supported. iOS uses scanDutyCycle for scanning and relies on firmware-side connection parameters because iOS exposes neither priority nor PHY control.

Constructors

PowerProfile.balanced()
Balances discovery responsiveness and energy use.
factory
PowerProfile.custom({required BleScanPowerMode scanMode, required BleConnectionPriority connectionPriority, required BlePhyPreference preferredPhy, required ScanDutyCycle scanDutyCycle})
Creates an application-defined policy.
factory
PowerProfile.fromMap(Map<Object?, Object?> map)
Decodes a complete platform-channel power policy.
factory
PowerProfile.latencyFirst()
An explicit high-performance policy for latency-sensitive operations.
factory
PowerProfile.powerSaver()
Minimizes radio activity with a conservative iOS scan duty cycle.
factory

Properties

connectionPriority BleConnectionPriority
Default connection priority; ignored by iOS itself.
final
hashCode int
The hash code for this object.
no setterinherited
preferredPhy BlePhyPreference
Preferred radio PHY; ignored by iOS.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scanDutyCycle ScanDutyCycle
iOS software scan timing; ignored by Android.
final
scanMode BleScanPowerMode
Default scan mode and Android native scan policy.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
Encodes every policy field for a platform channel.
toString() String
A string representation of this object.
inherited

Operators

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