When publishing a pub package, the docs say to run the following command:
flutter pub publish --dry-run
However, this is giving the following error:
Could not find an option named "dry-run".
Run 'flutter -h' (or 'flutter -h') for available flutter commands and options.
How do I run a "dry-run"?
This is a self-answer Q&A after finding the answer. The answer is below.
This command works now:
flutter pub publish --dry-run
Use:
flutter pub pub publish --dry-run
Thanks to this post for the solution.