0

I have an already running Flutter project in Visual Studio Code, but I want to run a separate Dart file in the same project without terminate my running project.

When i tried to run this file, the running project stops.

James Westgate
  • 11,306
  • 8
  • 61
  • 68
hassan
  • 85
  • 1
  • 6

1 Answers1

0

You can open your terminal and execute your dart file like

$ dart ./file.dart

To open the terminal, use any of this options:

jamesblasco
  • 1,744
  • 1
  • 9
  • 25
  • i tried this in terminal but this was the result $' is not recognized as an internal or external command – hassan Jun 16 '20 at 07:17
  • The symbol $ is not meant to be used, it was to indicate is a command. Do `dart ./file.dart` – jamesblasco Jun 16 '20 at 07:21
  • i found this 'dart' is not recognized as an internal or external command – hassan Jun 16 '20 at 07:22
  • You have to add the dart sdk to your path variable as you probably did with Flutter. Hope this can help you: https://stackoverflow.com/a/49227850/8096916 – jamesblasco Jun 16 '20 at 07:25