Comments (11)
using platform channels right?
Yes. On macOS, the APIs are almost identical to the iOS versions. (A couple of classes still have the FLE
prefix, and will change in the future; that will be a breaking change, but one easy to update plugins for.)
Is there any way to publish the desktop plugins?
There's no tooling for automatically managing desktop plugins yet, so you can make them available however you like. Anyone using them at this point will need to manage building, including, and linking themselves.
I have a repo of a lot of plugins I made, I would love to add desktop support for them.
There are currently APIs for all three desktop platforms, so you could do that any time you want. Be aware that there are no guarantees about the stability of those APIs though, so you may need to change or rewrite anything you do now. (In practice, you can consider the macOS APIs that have the Flutter
prefix, which is almost everything for plugins, to be stable. Linux and/or Windows APIs could change, possibly including a complete rewrite.)
Dart Pub shows Flutter and Web, do you think it will show desktop too?
There are a lot of open questions about how plugin management will work given a much larger set of possible platforms; I would imagine that some kind of discovery system that takes that added complexity into account would need to be part of that.
from flutter-desktop-embedding.
I need to open a different window that runs a webview.
This seems like a pretty specific use case (as opposed to doing an inline webview); it's not clear to me this would be sufficiently general-purpose to add to this repository. I'd suggest hosting it separately, and if there's sufficient interest we could look at folding it into this repo. (Although long-term, I expect more federation, not less, with a model matching that used by mobile Flutter.)
Is there a compelling reason for it being developed in this repository?
If you're not developing it in this repo you can build it however you like, but:
i could make a shell call presumable from the Dart side to open the binary
That gives you a new application, not a new window. Those are fundamentally different.
due to zserge having a cpp base language to call
That API appears to be designed for making self-contained applications; it appears to be very poorly suited to showing a window within the context of an application that's doing other things. Going from a platform-specific plugin API to a thin cross-platform wrapper that appears to have the wrong abstraction for your use case which in turn immediately splits back into platform-specific code internally seems strictly worse that doing what you want to do directly using the platform APIs.
from flutter-desktop-embedding.
If you want it in a new window as requested in this issue, yes: write the platform-specific code to do so as you would in any other native application (e.g., on macOS, create a new NSWindow containing a WKWebView), and then call that code from a plugin.
(Embedding native views within the Flutter view, on the other hand, is currently not possible with the Flutter embedding API.)
from flutter-desktop-embedding.
For example if we want to use google maps in flutter on the desktop would we need to get the embeed views working first on MacOS?
That's correct. That reminded me that I never filed the bugs for those, although it's certainly something that's been on the radar. I've just filed flutter/flutter#31712, flutter/flutter#31713, and flutter/flutter#31714 for tracking.
for a temporary solution we can still open urls with a urlLauncher right?
I assume you mean the url_launcher
plugin? You'd need to write the native side locally, which would be straightforward if you are familiar with writing plugins (or wait for it to be written, which will likely be fairly soon since it's an obvious starting point for experimenting with what the plugin infrastructure will look like on desktop, and the plugin API is much more stable than it used to be.)
from flutter-desktop-embedding.
Is there a compelling reason for it being developed in this repository?
Absent an answer to this question, closing.
from flutter-desktop-embedding.
@stuartmorgan sorry missed this issue
thanks for the comment. It helped me alot to what a better way to approach it.
For now i am going to leave this as its way beyond me i have to admit
from flutter-desktop-embedding.
So is it possible to open a webview in desktop flutter somehow?
from flutter-desktop-embedding.
@stuartmorgan is this still the case? For example if we want to use google maps in flutter on the desktop would we need to get the embeed views working first on MacOS? for a temporary solution we can still open urls with a urlLauncher right?
from flutter-desktop-embedding.
Ok I don’t mind writing the plugin side, using platform channels right?
Is there any way to publish the desktop plugins?
I have a repo of a lot of plugins I made, I would love to add desktop support for them.
Dart Pub shows Flutter and Web, do you think it will show desktop too?
from flutter-desktop-embedding.
Hello, is it possible to embed NSViews view in Flutter view now? I need to embed a WKWebView to display the web, is there a good solution at present?
from flutter-desktop-embedding.
Webview support requests are tracked in the Flutter repository:
https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+webview_flutter+label%3A%22a%3A+desktop%22
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.