I’m developing a build_runner plugin that captures const widgets and converts them to images. The process should be triggered by running flutter packages pub run build_runner build
to create snapshots. However, I’m encountering issues importing Flutter within the build_runner context. When I try to import Flutter, it results in numerous reference errors.
I’m puzzled because if the command line can’t use Flutter, how does flutter test
work? It seems there should be a way to execute Flutter from the command line.
My questions are:
- Is it possible to use Flutter within a build_runner plugin?
- If so, how can I properly import and use Flutter in this context?
- Are there any specific considerations or limitations when trying to use Flutter with build_runner?
Any insights or solutions would be greatly appreciated. Thank you!