Skip to content

Add production flag to Env class#9

Closed
lelisa21 wants to merge 1 commit into
mainfrom
lelisa21-patch-2
Closed

Add production flag to Env class#9
lelisa21 wants to merge 1 commit into
mainfrom
lelisa21-patch-2

Conversation

@lelisa21
Copy link
Copy Markdown

@lelisa21 lelisa21 commented Apr 7, 2026

Summary by CodeRabbit

  • Chores
    • Added support for configurable API environments enabling switching between development and production API endpoints.
    • Updated API endpoint routing logic based on environment configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ab4b4f37-f130-404b-a051-d0b21e795d5e

📥 Commits

Reviewing files that changed from the base of the PR and between d301425 and 009cfba.

📒 Files selected for processing (1)
  • lib/core/config/env.dart

📝 Walkthrough

Walkthrough

A new production environment flag (isProd) was added to the Env configuration class, with corresponding logic in the baseUrl getter to conditionally route API requests to a production endpoint when the flag is enabled.

Changes

Cohort / File(s) Summary
Environment Configuration
lib/core/config/env.dart
Added isProd boolean constant (currently false) and updated baseUrl getter to prioritize production URL when isProd is true, otherwise fall back to existing platform-specific logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A flag for production, now set to its test,
The base URL knows which path is the best,
When isProd awakens from false to its true,
The API will follow the prod endpoint through! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Add production flag to Env class' accurately and concisely describes the main change: adding a new isProd constant to the Env class configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lelisa21-patch-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lelisa21 lelisa21 closed this Apr 7, 2026
@lelisa21 lelisa21 deleted the lelisa21-patch-2 branch April 7, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant