-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
Milestone
Description
This code does a basic regex to check for sdk: flutter in the pubspec.yaml to decide whether a project is a Flutter project or not:
Dart-Code/src/shared/utils/fs.ts
Lines 141 to 144 in b7c1124
| export function pubspecContentReferencesFlutterSdk(content: string): boolean { | |
| const regex = new RegExp("sdk\\s*:\\s*[\"']?flutter[\"']?", "i"); | |
| return regex.test(content); | |
| } |
It was done this way for simplicity when we had no yaml parser referenced. It can be tripped up by comments and other unrelated keys. Now we have a yaml parser, we should do this properly so it's reliable.
yeasin50