evaluateForPlan method
Evaluates which gates should be enabled for plan and returns a
FeatureGateConfig snapshot.
Implementation
FeatureGateConfig evaluateForPlan(Plan plan) {
final defaults = _planDefaults[plan] ?? {};
final gateMap = <FeatureGate, bool>{};
for (final gate in FeatureGate.values) {
gateMap[gate] = defaults.contains(gate);
}
return FeatureGateConfig(
gates: gateMap,
organizationId: _organizationId,
plan: plan,
evaluatedAt: DateTime.now(),
);
}