This PR aims to fix #282 by searching for the flutter sdk dependency from the pubspec.yaml file located in the root directory. This is based on the fact that the pubspec.yaml in all flutter projects requires the flutter sdk dependency, as stated by this specification.
This is the simplest way that I can think of to differentiate between flutter or dart project, but any other suggestions are welcome 😀.
EDIT: This is still not a perfect solution as this still doesn't account for any comments that can be provided in the yaml file, but I think with this change and keeping the old behavior should be good enough for most users.
This PR aims to fix #282 by searching for the flutter sdk dependency from the
pubspec.yaml
file located in the root directory. This is based on the fact that thepubspec.yaml
in all flutter projects requires the flutter sdk dependency, as stated by this specification.This is the simplest way that I can think of to differentiate between flutter or dart project, but any other suggestions are welcome 😀.
EDIT: This is still not a perfect solution as this still doesn't account for any comments that can be provided in the yaml file, but I think with this change and keeping the old behavior should be good enough for most users.