bmw-tech / widget_driver

A Flutter presentation layer framework
MIT License
20 stars 1 forks source link

Add support for Macros #168

Open robert-northmind opened 4 months ago

robert-northmind commented 4 months ago

Is your feature request related to a problem? Please describe. Currently widget driver is relying on build_runner and part-files to generate the TestDriver and DriverProvider. This might become a problem in the future since the dart team have plans to deprecate and remove the support for part-files. See here: https://github.com/dart-lang/language/blob/main/working/augmentation-libraries/feature-specification.md

It seems the future is to use the new augmentation feature and macros. This is still in beta but we should consider investing time soonish to learn about this and start adding support for macros as an alternative for BuildRunner and part-files.

Describe the solution you'd like The long-term solution would be to support macros instead of build_runner.

Describe alternatives you've considered I think there is no alternative. But currently the macro and augmentation is not part of stable dart. But soon they probably will be.

Additional context Maybe a first step is to just create a poc branch and see how macros and augmentation work.

robert-northmind commented 4 months ago

Here is more info about macros and how to write them

https://dart.dev/language/macros