Skip to content

Instantly share code, notes, and snippets.

@tomaszpolanski
Created April 20, 2019 10:40
Show Gist options
  • Save tomaszpolanski/58cb1167cf7cafa31e7033503ee035f3 to your computer and use it in GitHub Desktop.
Save tomaszpolanski/58cb1167cf7cafa31e7033503ee035f3 to your computer and use it in GitHub Desktop.
Building Flutter for MacOS
- `flutter channel master && flutter doctor`
- `export ENABLE_FLUTTER_DESKTOP=true`
- `git clone git@github.com:google/flutter-desktop-embedding.git`
- Move your project inside the `flutter-desktop-embedding` folder
- Copy the `macos` folder from `flutter-desktop-embedding/example` to your project
- `cd flutter-desktop-embedding/my-project && flutter run -d macos`
@app-o-matix
Copy link

app-o-matix commented Apr 22, 2019

Mine builds, but then nothing happens when I click the FAB.

19:07:04 › flutter run -d macos
Running "flutter packages get" in example...                        2.3s
Launching lib/main.dart on macOS in debug mode...
Building macOS application...
Syncing files to device macOS...
 2,221ms (!)

To hot reload changes while running, press "r". To hot restart (and rebuild
state), press "R".
An Observatory debugger and profiler on macOS is available at:
http://XXX.XXX.XXX.XXX:XXXXX/xXxxXxXX=/
For a more detailed help message, press "h". To detach, press "d"; to quit,
press "q".

Update: Did a hot restart ("R") and now the counter is functioning properly.

@rodydavis
Copy link

@nemoryoliver same here

@rodydavis
Copy link

I had to run flutter build macOS and then run the project from Xcode to get it to work. Wow this is awesome!

@edgarfgp
Copy link

Needs to add debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; to main functio. BTW you ROCK!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment