-
Notifications
You must be signed in to change notification settings - Fork 19
Flutter Support #109
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@jonas-jonas any progress here? |
No, currently working on #110. Will provide updates on that soon though and start working on this as well. |
Here are some observations from my attempt to open a Flutter project using Dartboard. The project is the "Hello world" example created by using the default Android Studio Flutter template.
I am trying out Dartboard on a fresh Windows 8.1 Pro installation, thus using the latest release versions of all tools. One thing I noticed during the Flutter set up on Android Studio is that a Dart plugin is installed as well. I expect there will be a lot of issues around the role of this plugin in getting a Flutter editor to work. If you have any questions or need assistance, I can be contacted using the email address in my profile. Regards |
Hi Andrew, thanks for taking the time to test this. The problem with Flutter apps is that they ship their own version of the Dart SDK (customized). This is not accounted for in the plugin, and thus Flutter projects are not supported yet. I'm working on it and it should be released by the end of the month.
We recommend using the WWD plugin.
There should be a popup on first selection of the "Run as Dart program" that lets you specify the location of the main file.
This is because the Flutter project setup expects src files to be inside the lib/ folder. This should not be necessary though, if you specify the correct location in the launch configuration.
I'm not sure I understand what you're saying here. The Flutter & Dart plugin are separate projects in IntelliJ/AS. This is just their setup. For us we combined these features for now and will only ship one plugin that supports Dart, Flutter and Dart Webdev projects instead of splitting them up. |
Ok, In the launch dialog I changed the "Main class:" field from "main.dart" to "lib/main.dart". This fixed the the problem of finding the main.dart file, but I still got multiple "Not found 'dart.ui'" errors. |
|
Yes, as @DanTup says. The I plan on adding a way to configure the Dart SDK from Flutter for Flutter projects though. I will ping this issue once Flutter development is ready for testing and usage.
You could use the preference page to set the Dart SDK location to Flutter manually. This would also get the analysis working. You would however need to launch the application from a command line manually. |
I don't think a preference is an immediate requirement, you can just find the location of the SDK by invoking
Is it really necessary in a 1st iteration? I don't get what value this would bring.
I think you don't need to parse, just checking if raw text file contains
Does a combination of Dartboard and |
We do have to decide whether to run
This is how it is done in the VSCode plugin, and I think it's a good approach.
Yes, but this is why we need a way to decide whether the project is a Flutter project or just Dart. I have started some work on this, but have become busy the past few weeks. So progress is slow at this time, but I definitely have it as a priority for the coming weeks. |
First iteration done in the wip-flutter branch. @jonas-jonas already opened new issues for the remaining items. |
For Flutter to be completely supported there are a few extra steps to be taken:
-> We need to add a Flutter location to the preferences (
<flutter_root>/bin/cache/dart-sdk/
)-> In the
pubspec.yaml
file of a projectflutter
is listed as a dependencyMight need to parse the yaml file here to be sure about this upfront (using a PropertyTester)
flutter
cli tools instead of the Dart toolse.g. use
flutter pub get
instead ofpub get
, etc.Probably also shouldn't use the shipped Dart SDK directly (as that might cause problems) [=> 1.]
flutter run
etc. via launch configurationsMaybe we can also implement shortcuts for the AVD Manager and simplify the whole process of setting up Flutter for the first time (which is quite tedious).
These are a few considerations to be aware of.
There might be more.
The text was updated successfully, but these errors were encountered: