Solution-
- Open Android Studio
- Go to File > Settings > Languages & Frameworks > Dart
- Tick on “Enable Dart Support for the project”
- Click on File browser at “Dart SDK path” input box
- Open your Flutter SDK location in the file browser
- Open bin > cache > dart-sdk in the file browser
- Select the current folder as SDK Path
- The final path should be similar to,
/home/user/flutter/bin/cache/dart-sdk
Under “Enable Dart support for the following modules”, select your app modules.
- Click on apply
- Restart Android Studio