-
Notifications
You must be signed in to change notification settings - Fork 282
Plugin info
Pierre Champion edited this page May 10, 2019
·
18 revisions
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.
To add plugin you need to use AddPlugin
If you are using hover edit desktop/cmd/options.go
.
Example:
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),
}
If you want to implement a plugin make sure to read an existing implementation, path_provider is a good example.