-
Notifications
You must be signed in to change notification settings - Fork 282
New Plugin: uni_links #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Platform specific: Windows: |
Is possible to pass arguments from go app to dart main function? |
No and you should avoid putting business code above For needs described above you can use the following system channel: https://api.flutter.dev/flutter/services/SystemChannels/navigation-constant.html
You can make a go-flutter plugin that invoke this method https://github.com/go-flutter-desktop/go-flutter/wiki/Implement-a-plugin#call-dart-from-golang Edit add simple example: channel := plugin.NewMethodChannel(p.messenger, "flutter/navigation", plugin.JSONMethodCodec{})
channel.InvokeMethod("pushRoute", "/anotherRoute") Dart: class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
routes: <String, WidgetBuilder>{
'/anotherRoute': (BuildContext context) =>
Scaffold(body: Text("anotherRoute")),
//other routes
},
home: Scaffold(body: Text("Home")),
);
}
} |
While we have the exper present: from my understanding Windows would spawn
a new process every time an uni link is opened. I think this process then
needs to start the actual app (if needed) and deliver the message. Is that
understanding correct? Is there any standard way for inter process
commutation in go?
|
I'm not an expert, but I does match my browser behavior, when I click on a link in the terminal either my browser is started with the link, or a new tab is opened.
again, not a big expert in that domain. |
This comment has been minimized.
This comment has been minimized.
any news on this? I'm willing to use move my app to go-flutter but lack the necessary knowledge to implement it myself. |
You could re-use your MacOS implementation to create a CGO plugin, but that still requires the knowledge of go and go-flutter plugins. |
is there some knowledge base or a quickstart for plugins ? |
Here are the official go-flutter plugins: https://github.com/go-flutter-desktop/plugins |
Yes, sure, checkout our wiki: |
The problem on implementing it for linux is that only the |
So aside from the code part, there will also be need to change something during packaging? Perhaps this can be related to the hooks discussion? |
@GeertJohan probably. In macOS i need to change the Info.plist to add the url schemes. Also the way go-flutter runs its dev builds on mac doesn't support that (it isn't a packaged .app) so it could be a bit hard to test this kind of feature. |
Hi,
I will probably need to use uni_links soon-ish. That will probably require some research, so I just wanted to create this issue to collect any info I can find.
The text was updated successfully, but these errors were encountered: