-
Couldn't load subscription status.
- Fork 282
Plugin info
go-flutter exposes the flutter's platform-channels allowing you to write platform-specific code.
Plugins development is where this project shine, with the power of Golang we only have to write plugin once for desktops.
Some popular plugins are already implemented over at github.com/go-flutter-desktop/plugins. If you have implemented a flutter/plugins that you would like to share, feel free to open a PR on the plugins repository!
Newly created go-flutter plugin implements a import.go.tmpl file, used to register the plugin by running hover plugins get.
- To list available plugins, run:
hover plugins list. - To import missing plugins, run:
hover plugins get. - To delete unused plugins, run:
hover plugin tidy. (--purgeflag is available to delete all previously imported go-flutter plugin)
To add plugin you can use the AddPlugin option. The file to edit is go/cmd/options.go.
Adding path_provider to your hover app:
package main
import (
"github.com/go-flutter-desktop/go-flutter"
"github.com/go-flutter-desktop/plugins/path_provider"
)
var options = []flutter.Option{
flutter.WindowInitialDimensions(800, 600),
flutter.AddPlugin(&path_provider.PathProviderPlugin{
VendorName: "myOrganizationOrUsername",
ApplicationName: "myApplicationName",
}),
// flutter.AddPlugin(&SomeOtherPlugin),
}hover will fetch the plugin, when building/running the app.