这是indexloc提供的服务,不要输入任何密码
Skip to content

[FEATURE] How to Configure Package for Different Flavors, Excluding Production #174

@wangjacsi

Description

@wangjacsi

I'm currently implementing the Alice package in a Flutter application that operates across multiple environments (development, staging, and production) using flavors. My goal is to integrate Alice for network debugging purposes in development (de) and staging (stg) environments, but I want to ensure that it is not included or activated in the production (prd) environment.

Could anyone provide guidance or examples on how best to configure the Alice package to be excluded from the production flavor? Any best practices or recommendations for managing this kind of environment-specific configuration would be greatly appreciated.

Here’s the basic setup of our Flutter flavors:

Development (de): Uses Alice for in-depth network debugging.
Staging (stg): Similar to Development, includes Alice for final checks before production.
Production (prd): Should not include Alice to avoid unnecessary overhead and potential security concerns.
I am particularly interested in any Flutter-specific approaches or patterns that could be recommended for toggling Alice's activation based on the build flavor.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions