Skip to content

🚩 Feature Flags & Environment Configuration

  • All new features should be thought of as feature flag and if it can be feature flagged or not.
  • A feature flag allows enabling/disabling the feature at runtime without code changes or redeploys or with code changes.
  • Developers must design features so they can be stopped, hidden, or disabled instantly if needed.
  • Global flags should be defined in shared/utils/flags.dart file.
  • feature specific flags should be defined in the feature's feature_name/flags.dart file.
  • Remove stale flags once the feature is stable and rolled out to all users.
  • The most important thing is to prevent spaghetti code and create code that is organized and standalone for reusability.