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.
2
Answers
You should right click on lib folder and create dart file or create file with extention .dart eg. abc.dart
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.