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:
Any insights or solutions would be greatly appreciated. Thank you!