-
Notifications
You must be signed in to change notification settings - Fork 81
feature plugin dependency management #33
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2789f5f
fix review comments & support for colors
pchampio 7a32970
adds hover publish-plugin
pchampio daf40cb
minor: wording & scoped variable
pchampio 394a637
fix go get plugin
pchampio 057bebc
fix: update to version on each `hover plugins get`
pchampio 3d6c961
minor: printf & return bool variable
pchampio b182eb7
minor: add example of import.go.tmpl in publish-plugin
pchampio c5c20d9
minor: Prompt to run git commands
pchampio f0e740d
fix: plugin remove str from go.mod
pchampio fe61fd0
fix: address review comments
pchampio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'package:flutter/foundation.dart' | ||
show debugDefaultTargetPlatformOverride; | ||
import 'package:flutter/material.dart'; | ||
|
||
import './main.dart'; | ||
|
||
void main() { | ||
debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; | ||
runApp(MyApp()); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# {{.pluginName}} | ||
|
||
This Go package implements the host-side of the Flutter [{{.pluginName}}](https://{{.urlVSCRepo}}) plugin. | ||
|
||
## Usage | ||
|
||
Import as: | ||
|
||
```go | ||
import {{.pluginName}} "{{.urlVSCRepo}}/go" | ||
``` | ||
|
||
Then add the following option to your go-flutter [application options](https://github.com/go-flutter-desktop/go-flutter/wiki/Plugin-info): | ||
|
||
```go | ||
flutter.AddPlugin(&{{.pluginName}}.{{.structName}}{}), | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package main | ||
|
||
// DO NOT EDIT, this file is generated by hover at compile-time for the {{.pluginName}} plugin. | ||
|
||
import ( | ||
flutter "github.com/go-flutter-desktop/go-flutter" | ||
{{.pluginName}} "{{.urlVSCRepo}}/go" | ||
) | ||
|
||
func init() { | ||
// Only the init function can be tweaked by plugin maker. | ||
options = append(options, flutter.AddPlugin(&{{.pluginName}}.{{.structName}}{})) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package {{.pluginName}} | ||
|
||
import ( | ||
flutter "github.com/go-flutter-desktop/go-flutter" | ||
"github.com/go-flutter-desktop/go-flutter/plugin" | ||
) | ||
|
||
const channelName = "{{.pluginName}}" | ||
|
||
// {{.structName}} implements flutter.Plugin and handles method. | ||
type {{.structName}} struct{} | ||
|
||
var _ flutter.Plugin = &{{.structName}}{} // compile-time type check | ||
|
||
// InitPlugin initializes the plugin. | ||
func (p *{{.structName}}) InitPlugin(messenger plugin.BinaryMessenger) error { | ||
channel := plugin.NewMethodChannel(messenger, channelName, plugin.StandardMethodCodec{}) | ||
channel.HandleFunc("getPlatformVersion", p.handlePlatformVersion) | ||
return nil | ||
} | ||
|
||
func (p *{{.structName}}) handlePlatformVersion(arguments interface{}) (reply interface{}, err error) { | ||
return "go-flutter " + flutter.PlatformVersion, nil | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.