MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / isInsideFlutterProject

Function isInsideFlutterProject

src/extension/utils.ts:21–30  ·  view source on GitHub ↗
(uri?: Uri)

Source from the content-addressed store, hash-verified

19}
20
21export function isInsideFlutterProject(uri?: Uri): boolean {
22 if (!uri)
23 return false;
24
25 const projectRoot = locateBestProjectRoot(fsPath(uri));
26 if (projectRoot)
27 return isFlutterProjectFolder(projectRoot);
28 else
29 return isFlutterWorkspaceFolder(workspace.getWorkspaceFolder(uri));
30}
31
32export function isPathInsideFlutterProject(path: string): boolean {
33 // TODO(dantup): This can be called quite a lot when discovering tests, so consider

Callers 4

runTestsForNodeMethod · 0.90
startTestFromOutlineMethod · 0.90
isGeneratableFileMethod · 0.90
provideCodeLensesMethod · 0.90

Calls 4

locateBestProjectRootFunction · 0.90
fsPathFunction · 0.90
isFlutterProjectFolderFunction · 0.90
isFlutterWorkspaceFolderFunction · 0.85

Tested by

no test coverage detected