skip to Main Content

I can’t create a new dart file in android studio.Please help

[main.dart is auto created by android studio] screen1

[flutter doctor is fine] screen2

2

Answers


  1. You should right click on lib folder and create dart file or create file with extention .dart eg. abc.dart

    Login or Signup to reply.
  2. Open your flutter project in android studio. Go to android studio settings by following this flow. File => Settings => Languages & Frameworks and select Dart check its Sdk path is it correct or not and is the dart support is enabled for your project or not.

    If this is all good then by right click at lib and hover on New => Dart File give it some name (extension is not required just name it) and you are good to work in it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search