rogerluan / arkana

Use dotenv files for Android and iOS projects.
BSD 2-Clause "Simplified" License
379 stars 18 forks source link

add support for flutter using dart generator #68

Open humblerookie opened 3 months ago

humblerookie commented 3 months ago

Description

We use flutter a lot in my company and have been using arkana for our ios projects, so thought of adding support for flutter.

This builds on an infra similar to @husseinala's https://github.com/rogerluan/arkana/pull/53.

Arkana Arguments

The --lang operator now supports dart.

Arkana YAML config

The existing result_path allows you to specify a subfolder path/location in the dart project.

Generated Assets

{namespace}.dart

Screenshot 2024-06-14 at 1 12 39 PM

{namespace}_environment.dart

Screenshot 2024-06-14 at 1 12 54 PM

{namespace}_tests.dart

Screenshot 2024-06-14 at 1 15 10 PM

Footnotes

The import path in tests file is currently relative although absolute/package imports are preferred. However, package imports would require us to

I'd appreciate any recommendations and love to hear your thoughts on this.

humblerookie commented 3 months ago

@rogerluan Any thoughts on this? Would appreciate any feedback

rogerluan commented 3 months ago

Hi @humblerookie ! Sorry for the radio silence, I haven't had time to review this yet as my weeks have been pretty hectic 🤕 I promise to come back to this as soon as I can! Meanwhile, you can always point your Gemfile to this PR if you need to use this code, like this:

gem 'arkana', git: 'https://github.com/humblerookie/arkana.git', branch: 'main'

And run bundle install to apply the changes.

I hope I'm not blocking your awesome work!

Again, I'll try to come back to this and give this a proper review some time soon 🙏 Thanks a lot for your contribution! ❤️

humblerookie commented 3 months ago

@rogerluan No worries at all, and thanks for the suggestions.