wolfenrain / fluttium

Fluttium, the user flow testing tool for Flutter

Home Page:https://fluttium.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: add `--dart-define` options to the CLI to pass to the Flutter process

aidanmack opened this issue · comments

Description

Fluttium is looking great, thankyou!

Would it be possible to include some kind of setup yaml file maybe?
At build time my app requires run time arguments and I see no way of getting Fluttium to build with them.

What kind of run time arguments would you need, and in what way do you normally pass them to Flutter itself?

Sure,

So this is building the flutter project on the command line...
flutter build ipa --flavor=prod --dart-define=CLIENT=terry_tibs --dart-define=BASE_URL=https://terrytibs.co.uk

You can see that it builds an ipa
we set the flavor to prod
And then I can include any number of dart defined key values.

As an example I've passed in client and a baseurl

Ah yea we can just expose --dart-define on the CLI, just like we did with the flavor and target options!

Nice!
So is there someway of me setting the flavor or target already before I run the test?

oh sorry I've just seen it in the docs 🤦

I'll work on adding support for dart-define after I merge and release #70 (as it refactors the internal driver code, which this would touch)

Thanks man, appreciated!