defaults constant
DeviceTierConfig
const defaults
The backend defaults, the source of truth when the backend sent nothing.
Implementation
static const DeviceTierConfig defaults = DeviceTierConfig(
weights: {
'cpuLevel': 3.0,
'memoryLevel': 3.0,
'thermalLevel': 2.0,
'batteryLevel': 1.0,
},
rules: [
TierRule(
tier: 'low',
any: [
TierCondition('isLowRamDevice', {'eq': true}),
TierCondition('isSystemLowOnMemory', {'eq': true}),
TierCondition('isPowerSaveMode', {'eq': true}),
TierCondition('isReduceMotionEnabled', {'eq': true}),
TierCondition('thermalLevel', {'eq': 1}),
TierCondition('memoryLevel', {'eq': 1}),
TierCondition('cpuLevel', {'eq': 1}),
],
),
TierRule(
tier: 'high',
all: [
TierCondition('performanceScore', {'gte': 3.0}),
TierCondition('batteryLevel', {'gte': 2.0}),
],
),
TierRule(
tier: 'mid',
all: [
TierCondition('performanceScore', {'gte': 2.0}),
],
),
],
fallback: 'low',
);