Add support for Flutter snap on Linux#2613
Merged
DanTup merged 6 commits intoDart-Code:linux-snap-supportfrom Jul 7, 2020
Merged
Add support for Flutter snap on Linux#2613DanTup merged 6 commits intoDart-Code:linux-snap-supportfrom
DanTup merged 6 commits intoDart-Code:linux-snap-supportfrom
Conversation
…de/Dart-Code into support-flutter-snap
da62162 to
08b864a
Compare
Member
|
@MarcusTomlinson looks great, thanks! I'm going to merge into a branch for now so I can try it out when I have a VM set up and also to try and include a test for it in GitHub actions. I may ping you if I get stuck of have questions. Thanks! |
DanTup
added a commit
that referenced
this pull request
Jul 7, 2020
* Support overriding the base Flutter script without each individual command * Add support for Flutter snap on Linux * Don't set flutterScript if snap not initialized * Move snap initialization to findFlutterSnapSdkRoot Co-authored-by: Danny Tuppeny <[email protected]>
DanTup
added a commit
that referenced
this pull request
Jul 8, 2020
* Support overriding the base Flutter script without each individual command * Add support for Flutter snap on Linux * Don't set flutterScript if snap not initialized * Move snap initialization to findFlutterSnapSdkRoot Co-authored-by: Danny Tuppeny <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At Canonical we've developed a convenient way to install and use Flutter on Linux.
By simply running:
You'll have all the dependancies you need to begin developing Flutter applications. From here you just type:
flutter create,flutter run, etc. as normal to perform flutter tasks.The Flutter repo is stored under
$HOME/snap/flutter/common/flutter/, but the actual flutter script (executed by the call toflutter) is installed to/snap/flutter/current/flutter.sh. This allows users to switch flutter versions as needed via the home directory, while taking advantage of the dev environment provided by the snap.To get this working in VS Code, we need the extension to detect whether the flutter snap is installed, and if so, be aware of the separate repo and script paths for execution.
Furthermore, because snaps are installed at root-level, the Flutter repo is only populated on first user run of the snap. We therefore must also check if the repo exists on startup, and initialise it if not.