[Flutter] How to remove all comments in starter app

How to do it in Visual Studio Code.

Environment

  • Visual Studio Code
  • OS: Mac or Windows

For macOS

Instructions

  1. Run flutter create in Terminal.
  2. Open main.dart in Visual Studio Code.
  3. Command + Option + F (⌥⌘F) [Replace].
  4. Command + Option + R (⌥⌘R) [Use Regular Expression].
  5. Type //.* in search form.
  6. Press the Tab key to go to the replace form.
  7. Command + Enter (⌘Enter) [Replace All].
  8. Command + S (⌘S) [Save], AutoFormat.

For Windows

Instructions

  1. Run flutter create in Terminal.
  2. Open main.dart in Visual Studio Code.
  3. Control + H [Replace]
  4. Alt + R [Use Regular Expression]
  5. Type //.* in search form.
  6. Press the Tab key to go to the replace form.
  7. Control + Alt + Enter [Replace All]
  8. Control + S [Save], Auto-format.

YouTube