Open TatsuUkraine opened 4 years ago
Yes, this feature in 1.17 took me a bit by surprise! Have to figure out where to put it...
Yes, this feature in 1.17 took me a bit by surprise! Have to figure out where to put it...
can you please describe where to put the documentation about --dart-define key?
@Roshan13046, we now have a Flutter CLI page. It should go there.
Flutter 1.17 added support for custom compile-time variables in flutter tools with
--dart-define
Quite interesting feature not just in terms of defining compile time variables for Dart, but also in terms of alternative way of environment configuration for application instead of flavors.
In my personal opinion, it would be helpful for developers to know about this feature when they're choosing the way how to setup they're configuration for multiple environments or just define compile-time variables.
I wrote small article about this feature and how it can be used instead of flavors. If it helps, feel free to use it)
The article link is not working. Can you please share a correct link for reference about the topic dart-define key?
@Roshan13046 strange, it works for me, here is a friendly link from medium let me know if it works
I found another copy on binary-studio.
@sfshaza2 it might be not up to date, I was making changes in the article on medium after 1.20 flutter release
@sfshaza2 thanks for reminding me about it, btw) need to update it as well)
@sfshaza2 thanks for reminding me about it, btw) need to update it as well)
@Roshan13046 strange, it works for me, here is a friendly link from medium let me know if it works
Thanks! The link is working now. Should I include another row in the table of Page for --dart-define key or write a separate section for --dart-define key?
hi, just curious, is there any update?) Flutter 3.7 recently introduced another way to pass compile-time variables, which probably also good to have in the docs
If it helps, I made another article about it, feel free to use it if needed
Flutter 1.17 added support for custom compile-time variables in flutter tools with
--dart-define
Quite interesting feature not just in terms of defining compile time variables for Dart, but also in terms of alternative way of environment configuration for application instead of flavors.
In my personal opinion, it would be helpful for developers to know about this feature when they're choosing the way how to setup they're configuration for multiple environments or just define compile-time variables.
I wrote small article about this feature and how it can be used instead of flavors. If it helps, feel free to use it)