You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't want to inject a dev config in prod env.Now the code like below:
@dev
class DevConfig {}
@prod
class ProdConfig{}
$initGetIt(getIt,environment:prod);
but the DevConfig still be injected, so dart will not remove it from the compiled app.I want to use a constant to control whether it is injected.generated code like this
if (injectDev) singleton<Config>(DevConfig(), registerFor: {_dev})
An alternative would be to generate separated injector functions. One per flavor/environment.
Regarding the ones that use filters, they could be grouped in yet another isolated injector function.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
I don't want to inject a dev config in prod env.Now the code like below:
but the DevConfig still be injected, so dart will not remove it from the compiled app.I want to use a constant to control whether it is injected.generated code like this
then
The text was updated successfully, but these errors were encountered: