-
I am currently adding optional generation of firebase helper functions to the freezed annotation. There are two settings:
I have created a corresponding FreezedFirebaseHelpersOptions class in order to be able to configure this from build.yaml as well. However, setting a default path in yaml obviously does not make sense, and using a configuration object in the annotation feels clunky:
I would rather prefer to merely set firebaseHelpers in build.yaml to true (if I just want to enable those for all freezed classes) and add the path in the annotation - although this does not conform with the way other optional arguments are handled. build.yaml
or without build.yaml:
The last option would be to implicitly enable the helper by adding only a path argument. Then the firebaseHelpers: true argument would not be required, but you would always have to set a default path. Which approach is recommended here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well I settled for Freezed(firebasePath: 'somePath') |
Beta Was this translation helpful? Give feedback.
Well I settled for Freezed(firebasePath: 'somePath')