Search code examples
flutterflutter-web

How can I wiew the source code for flutter commands (CLI)?


I'd like to view the source code for flutter commands like flutter run -d chrome and flutter build web. I'd like to know what's happening behind the scenes. Where are those files located?


Solution

  • The source for the flutter tool eg CLI-tool is provided with flutter and located in <flutter install path>/packages/flutter_tools.

    For the run command, look at lib/src/commands/run.dart.