AppGates class

AppGates · Unified launch-gate helper

Combines the two layers of feature gating into a single, intention-revealing API so the rest of the codebase never has to remember which global flag to combine with which subscription check.

Capas

Capa 1 — Global flags       (AppConfig.instance.*)
  • showBetaFeatures        : master kill-switch for beta (false in launch)
  • hasEarlyAccess          : master kill-switch for early access
  • isAdminMode             : admin bypass

Capa 2 — Per-user tier      (SubscriptionLevel on UserController)
  • premium+                : beta
  • platinum+               : early access

Capa 3 (flavour) stays at the call site via AppFlavour.showX() because AppFlavour lives in neom_commons and we can't import it from neom_core without creating a circular dependency.

Uso

// Antes:
if (AppFlavour.showVst() && AppConfig.instance.showBetaFeatures) { ... }

// Ahora:
if (AppFlavour.showVst() && AppGates.canUseBeta()) { ... }

// Saia launch gates:
if (AppGates.canUseSaiaMemory())        { /* show memory UI */ }
if (AppGates.canUseSaiaMultiProvider()) { /* show provider picker */ }
if (AppGates.canUseSaiaOffline())       { /* show Ollama card */ }

Properties

hashCode int
The hash code for this object.
no setterinherited
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

Static Properties

earlyAccessEnabled bool
Master global switch for early access features. true during launch. Acts as an emergency kill-switch: if something goes wrong post-launch, flipping this to false hides every early access feature instantly.
no setter
isAdmin bool
Admin override. When true, all gates return true regardless of global flags or subscription level.
no setter
showBeta bool
Master global switch for beta features. false during Itzli launch.
no setter

Static Methods

canUseBeta() bool
Canonical check for beta features. Replaces raw AppConfig.instance.showBetaFeatures checks across the app.
canUseEarlyAccess() bool
Canonical check for early access features.
canUseHiddenBeta() bool
Hidden-beta gate for features that must stay invisible to the general public during the Itzli launch but remain accessible to admins and to paying users that help us dogfood them (InterComm, Booking, VST, DAW).
canUseSaiaAdvancedTools() bool
Saia advanced tool calling: subagents, MCP, code execution, RAG.
canUseSaiaBench() bool
Saia benchmark runner (neom_ia_bench).
canUseSaiaMemory() bool
Saia long-term memory: dreaming scorer, consolidation, personal context.
canUseSaiaMultiProvider() bool
Saia multi-provider routing (Claude + GPT + Gemini + Mistral).
canUseSaiaOffline() bool
Saia offline mode with local Ollama models.
currentLevel() SubscriptionLevel
Resolves the current user's SubscriptionLevel safely.
isPlatinumOrAbove([SubscriptionLevel? level]) bool
True iff the given (or current) level is platinum or higher. Platinum is the baseline for early access.
isPremiumOrAbove([SubscriptionLevel? level]) bool
True iff the given (or current) level is premium or higher. Premium is the baseline for beta features.
isSaiaLaunchActive() bool
Saia launch master check. Returns true if Saia as a product is active at all (regardless of per-feature tiers). Useful for the main entry point of the Saia experience in the drawer/sidebar.