Reputation: 29
How to run any one module in Flutter without having to run main.dart?
Upvotes: 0
Views: 1525
Reputation: 562
If you want to run any module then it must have the main function defined, as it is the entry point to any dart or flutter app. Just right-click any dart file you want to run and select Run in Android Studio. The run option won't show if the dart file doesn't define the run method. In VS Code you can create a run configuration pointing to a specific file.
Upvotes: 2