Comments (11)
The current plan is to eliminate the GLFW implementations as the view-based solutions for each solution are implemented.
While we could potentially keep the GLFW implementation as well, it has fundamental limitations (e.g., the menubar plugin will never work well), and supporting four implementations rather than three would add more complexity. But if there end up being important use cases for a GLFW implementation it could be kept.
from flutter-desktop-embedding.
I would say that for pure-flutter applications the GTK only adds extra overhead. I'm not sure if there is a performance difference between GTK and GLFW, the latter feels simpler.
Anyhow, a menubar can be implemented in pure flutter as well. VS Code recently added a custom menubar so it's not depending on the native one anymore, it aligns the look and feel on each platform and allows for better styling with the rest of the application.
At the same time I can see how maintaining two implementations adds complexity, so yes it should only be done if GLFW is actually used and has real-world advantages over GTK (or other toolkit).
from flutter-desktop-embedding.
I would say that for pure-flutter applications the GTK only adds extra overhead.
It certainly adds dependencies. Whether that will be a significant issue in practice remains to be seen.
for pure-flutter applications [...] the latter feels simpler
I suspect most people doing pure-Flutter applications on mobile don't think/care much about what the platform implementation looks like, and similarly won't care much (again, beyond potential concerns about dependencies) about whether the Linux implementation uses GLFW or GTK once there's Flutter-like tooling that abstracts away the need for most people to interact with that code.
Anyhow, a menubar can be implemented in pure flutter as well.
It was just an example. The fact that it's possible to implement things entirely in Flutter has not eliminated a desire in the existing mobile Flutter development space for support for hybrid development, and GLFW can't support that. GTK, on the other hand, can support both models of development.
from flutter-desktop-embedding.
there was interesting discussion about this on twitter some time ago:
https://twitter.com/mmikolajp/status/969599534077689856
from flutter-desktop-embedding.
That discussion seems to assume that the only goal is to simply launch a Flutter app as a desktop app; I don't see any mention of hybrid app development. Given that a somewhat popular question on the flutter-dev list recently has been how to embed a Flutter view into a native mobile application, it seems important to consider on desktop where it seems more likely to be potentially useful than on mobile.
GLFW is fundamentally at odds with supporting hybrid applications as far as I can tell.
from flutter-desktop-embedding.
makes sense. maybe make gtk and qt solutions later on.
from flutter-desktop-embedding.
At the same time, using GLFW has benefits (no dependency on gtk, for examle). So the goal is to support both strategies?
from flutter-desktop-embedding.
Peanut gallery/couch programmer comment but genuinely interested if you're open to responding, Why is not using Skia like Flutter does on Android/iOS?
from flutter-desktop-embedding.
Why is not using Skia like Flutter does on Android/iOS?
I don't understand the question; I'm not aware of any difference between how Skia is used by the Flutter engine on Linux vs Android and iOS. But if you have questions about the details of the implementation of the Flutter engine, this project isn't a good place to get answers since it's just a client of the engine.
from flutter-desktop-embedding.
@ninjatraderdev Skia is still used here. GTK and GLFW can be seen as a "frame" around the rendered application UI. GTK or GLFW just handles the creation and management of a window in which the Flutter application is rendered (by Skia).
Of course GTK can draw things like buttons itself as well, but that's not being used by Flutter.
from flutter-desktop-embedding.
Moved to flutter/flutter#30729
from flutter-desktop-embedding.
Related Issues (20)
- window_size null-safety HOT 1
- Flutter launch error HOT 7
- setInitialRoute for Windows flutter::FlutterViewController HOT 1
- Window size is not correct when i first lunch the app unless i drag it HOT 3
- can't set window size. HOT 4
- App crashes if first minimize the window and then call setWindowVisibility(visible: true) HOT 1
- Throws MissingPluginException during test HOT 2
- setWindowMinSize and setWindowMaxSize not working in Flutter 2.8.0 on Windows 11 HOT 2
- Could not find a file named "plugins/file_chooser/pubspec.yaml HOT 4
- File Description HOT 1
- Linux on ARM: window_size causes "pub get" to hang HOT 3
- [menubar] 'MenuItem' is imported from both 'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:menubar/src/menu_item.dart' HOT 1
- [window_size] Window size cause GitHub timeout during flutter pub get HOT 1
- [menubar] Add "disabled" boolean on NativeMenuItem HOT 1
- Auto-Update flutter desktop app like Discord and Telegram desktop apps HOT 2
- DPI scale reactor needed HOT 1
- Git error. Command: `git clone --mirror git://github.com/google/flutter-desktop-embedding.git HOT 1
- [window_size] setWindowMinSize calculates window size without using DPI on some Windows version HOT 1
- is there in Flutter itself already ? HOT 1
- Run Flutter app in windows 32 bit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-desktop-embedding.