0

enter image description here

When I click the green button left to void main which says Run main.dart I am presented with this error message. So, how can I then run a simple Dart code from my IDE (Android Studio)?


Note:

This question is NOT about running a Flutter app but the Dart code. So, please don't mark it a duplicate of questions like this.

I also don't want to run dart main.dart command.

iDecode
  • 22,623
  • 19
  • 99
  • 186

1 Answers1

0

I just found that I was importing some Flutter packages in the same file, so once I removed them, I am able to run the app.

iDecode
  • 22,623
  • 19
  • 99
  • 186