Open amake opened 4 years ago
The way VSCode dart extension and lsp-dart
handles this is checking the pubspec.yml file on project root then searching for a flutter
SDK regex dependency :)
https://github.com/emacs-lsp/lsp-dart/blob/master/lsp-dart-utils.el#L44-L51
Thanks! Yeah I was hoping for something possible without reading the contents of any files, but that does seem to be the most foolproof way.
Yeah, me too :sweat_smile: , but it seems to be working very well for VSCode
In an effort to support running tests in pure-Dart projects (because you may want to work on a pure-Dart project for use in a Flutter project), we try to be smart about which invocation to use:
flutter test
orpub run test
.But we are not smart enough: we assume a Flutter project only if the file has a
import package:flutter(_test)?/...
statement, and otherwise assume a Dart project.This falls down for pure-Dart files in Flutter packages.
We need some cheap way of determining whether the project is a Flutter one or not.