-
Notifications
You must be signed in to change notification settings - Fork 282
Plugin info
Pierre Champion edited this page Apr 26, 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 multi-platform 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.