Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Question] How does this compare to the "official" flutter desktop? #191
@GeertJohan and I are maintaining this alternative desktop embedder.
This approach has some benefits: plugins are way easier to write in Golang than in C++/Objective-C; and our API is easier to use for non-system developers. Those reasons are why we are maintaining such package.
The major drawback is that we aren't part of the flutter team. So at some point, if @GeertJohan and I stop maintaining this package, it is going to die.
That been said, the embedder is a relatively small layer between the flutter/engine and a rendering API (GLFW in our case). The
My opinion is:
Your core business logic is written in Dart; there is no cost in swapping the embedder!
To sum up,
Not that much, modulo some implementation differences, it's the same, but in another programing language.
At some point, FDE will have more feature than what go-flutter offers. I'm okay with that; we aren't google!
Edit1: what I was calling FDE is now part of flutter, it should now simply be called 'flutter desktop'.
Edit2: it's possible to write macos plugins in swift.
Edit3: Look at the below #191 (comment) to get the latest differences.
A few minor notes, since there have been a number of changes since July. (Please don't take this as criticism; I think your overview of the similarities and differences is excellent!)
To expand on that a bit:
Flutter plugin APIs are part of each embedding, not Flutter itself; there's no such thing as "go plugins" for Flutter in a generic sense, there are go-flutter plugins. The lack of interoperability isn't primarily about them being in Go, but that the APIs are not the same.
As one concrete example: go-flutter's plugin API appears to include a way of getting a pointer to the GLFW window. Flutter's macOS and Windows embeddings have no GLFW windows (Linux won't either, eventually), so it's impossible to use a plugin that expects one. The richer the plugin APIs become, the more of that kind of problem will exist.