Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: facelift both Envied and EnviedGenerator to Dart 3.0 #46

Merged
merged 7 commits into from
Aug 22, 2023
Merged

refactor: facelift both Envied and EnviedGenerator to Dart 3.0 #46

merged 7 commits into from
Aug 22, 2023

Conversation

techouse
Copy link
Collaborator

@techouse techouse commented Aug 10, 2023

  • bump the version to 0.4.0
  • raise Dart SDK minimum to 3.0.0
  • update dependencies (except analyzer)
  • add a const constructor to the EnviedGenerator
  • add the final Dart 3 class modifier Envied, EnviedField, EnviedGenerator and Parser
  • declare all the Parser methods as static
  • refactor the generator by:
    • adding explicit types
    • explicitly declaring nested functions
    • converting all immutable var variables to final
  • generate all _Env classes with the final Dart 3 class modifier, i.e.
    final class _Env16 {
      static const String testDefaultParam = 'test_';
    }
  • update example

@Ax0elz
Copy link

Ax0elz commented Aug 19, 2023

Can this be pushed through? This is much needed as generation currently fails on the latest version of Flutter/Dart 3.0

@techouse
Copy link
Collaborator Author

generation currently fails on the latest version of Flutter/Dart 3.0

Err, works fine for me in Dart 3.0 and 3.1 without this PR. You probably have some user error that's preventing you from successfully generating envs.

Try to clone the examples from this repo and test the generation of those.

@petercinibulk petercinibulk merged commit 0952c18 into petercinibulk:main Aug 22, 2023
@techouse techouse deleted the chore/refactor-dart-3 branch August 22, 2023 13:12
@techouse techouse added the enhancement New feature or request label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants