question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flutter projects in sub-folders do not result in Flutter's Dart SDK being used

See original GitHub issue

Hi Dan,

When Flutter is part of a monorepo for some reason /test/widget_test.dart will not handle its imports properly.

I created an example here for you to review when you have a moment. As a note, flutter test still runs perfectly regardless.

https://github.com/lukepighetti/flutter-vsc-monorepo-mvce

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Oct 15, 2018

Sorry for the delay! This is sadly a bit of a known case. Because you’ve opened the parent folder, we’ve deemed that your project is plain Dart, not Flutter, and we’ve loaded the non-Flutter version of the SDK.

I’ve seen this come up a few times recently, so I’ll see what I can do. I think at a bare minimum, we could walk into the top-level folders when making the decision about the project type. You won’t get the best experience if you don’t add the folder as a workspace folder though - please 👍 on https://github.com/Microsoft/vscode/issues/45470 because it’s blocking us from automatically upgrading folders.

0reactions
DanTupcommented, Oct 24, 2018

Beta here if you’d like to test it before it’s released -> https://github.com/Dart-Code/Dart-Code/releases/tag/v2.20.0-beta.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter projects are no longer being provisioned with the lib ...
When i create a new flutter project, the new project is no longer provisioned with the example app, there is no lib folder...
Read more >
Integrate a Flutter module into your Android project
Flutter can be embedded into your existing Android application piecemeal, as a source code Gradle subproject or as AARs. The integration flow can...
Read more >
Flutter applications | Snapcraft documentation
Flutter is Google's open source tookit to help create beautiful, responsive, and natively compiled applications for mobile, web and desktop.
Read more >
Flutter - Asset Image - GeeksforGeeks
It should be in the root of your flutter project. You can name it whatever you want, but assets are preferred. If you...
Read more >
v2.11 - Dart Code - Dart & Flutter support for Visual Studio Code
Set the dart.flutterSdkPaths setting to an array of SDK folders (or folders containing SDKs) to use this. Note: This does not change your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found