You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,24 @@ The hot-reload is manual because you'll need to press 'r' in the terminal to hot
77
77
78
78
By default, hover uses the file `lib/main_desktop.dart` as entrypoint. You may specify a different endpoint by using the `--target` flag.
79
79
80
+
You can also use the configuration in the pubspec.yaml (this is the default configuration):
81
+
```yaml
82
+
name: ...
83
+
description: ...
84
+
version: ...
85
+
86
+
dependencies: ...
87
+
88
+
flutter: ...
89
+
90
+
go-flutter:
91
+
target: lib/main_desktop.dart
92
+
branch: "@master"
93
+
cache-path: "/home/YOURUSERNAME/.cache/"
94
+
opengl: "3.3"
95
+
docker: false
96
+
```
97
+
80
98
If you want to integrate go-flutter with VSCode, read this [issue](https://github.com/go-flutter-desktop/go-flutter/issues/129#issuecomment-513590141).
buildCmd.PersistentFlags().StringVarP(&buildTarget, "target", "t", "lib/main_desktop.dart", "The main entry-point file of the application.")
48
-
buildCmd.PersistentFlags().StringVarP(&buildBranch, "branch", "b", "", "The 'go-flutter' version to use. (@master or @v0.20.0 for example)")
52
+
buildCmd.PersistentFlags().StringVarP(&buildTarget, "target", "t", buildTargetDefault, "The main entry-point file of the application.")
53
+
buildCmd.PersistentFlags().StringVarP(&buildBranch, "branch", "b", buildBranchDefault, "The 'go-flutter' version to use. (@master or @v0.20.0 for example)")
49
54
buildCmd.PersistentFlags().BoolVar(&buildDebug, "debug", false, "Build a debug version of the app.")
50
-
buildCmd.PersistentFlags().StringVarP(&buildCachePath, "cache-path", "", "", "The path that hover uses to cache dependencies such as the Flutter engine .so/.dll (defaults to the standard user cache directory)")
51
-
buildCmd.PersistentFlags().StringVar(&buildOpenGlVersion, "opengl", "3.3", "The OpenGL version specified here is only relevant for external texture plugin (i.e. video_plugin).\nIf 'none' is provided, texture won't be supported. Note: the Flutter Engine still needs a OpenGL compatible context.")
55
+
buildCmd.PersistentFlags().StringVarP(&buildCachePath, "cache-path", "", buildCachePathDefault, "The path that hover uses to cache dependencies such as the Flutter engine .so/.dll (defaults to the standard user cache directory)")
56
+
buildCmd.PersistentFlags().StringVar(&buildOpenGlVersion, "opengl", buildOpenGlVersionDefault, "The OpenGL version specified here is only relevant for external texture plugin (i.e. video_plugin).\nIf 'none' is provided, texture won't be supported. Note: the Flutter Engine still needs a OpenGL compatible context.")
52
57
buildCmd.PersistentFlags().BoolVar(&buildDocker, "docker", false, "Compile in Docker container only. No need to install go")
Copy file name to clipboardExpand all lines: cmd/run.go
+4-4
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,10 @@ import (
20
20
varrunObservatoryPortstring
21
21
22
22
funcinit() {
23
-
runCmd.Flags().StringVarP(&buildTarget, "target", "t", "lib/main_desktop.dart", "The main entry-point file of the application.")
24
-
runCmd.Flags().StringVarP(&buildBranch, "branch", "b", "", "The 'go-flutter' version to use. (@master or @v0.20.0 for example)")
25
-
runCmd.Flags().StringVarP(&buildCachePath, "cache-path", "", "", "The path that hover uses to cache dependencies such as the Flutter engine .so/.dll (defaults to the standard user cache directory)")
26
-
runCmd.Flags().StringVar(&buildOpenGlVersion, "opengl", "3.3", "The OpenGL version specified here is only relevant for external texture plugin (i.e. video_plugin).\nIf 'none' is provided, texture won't be supported. Note: the Flutter Engine still needs a OpenGL compatible context.")
23
+
runCmd.Flags().StringVarP(&buildTarget, "target", "t", buildTargetDefault, "The main entry-point file of the application.")
24
+
runCmd.Flags().StringVarP(&buildBranch, "branch", "b", buildBranchDefault, "The 'go-flutter' version to use. (@master or @v0.20.0 for example)")
25
+
runCmd.Flags().StringVarP(&buildCachePath, "cache-path", "", buildCachePathDefault, "The path that hover uses to cache dependencies such as the Flutter engine .so/.dll (defaults to the standard user cache directory)")
26
+
runCmd.Flags().StringVar(&buildOpenGlVersion, "opengl", buildOpenGlVersionDefault, "The OpenGL version specified here is only relevant for external texture plugin (i.e. video_plugin).\nIf 'none' is provided, texture won't be supported. Note: the Flutter Engine still needs a OpenGL compatible context.")
27
27
runCmd.Flags().StringVarP(&runObservatoryPort, "observatory-port", "", "50300", "The observatory port used to connect hover to VM services (hot-reload/debug/..)")
28
28
runCmd.Flags().BoolVar(&buildOmitEmbedder, "omit-embedder", false, "Don't (re)compile 'go-flutter' source code, useful when only working with Dart code")
29
29
runCmd.Flags().BoolVar(&buildOmitFlutterBundle, "omit-flutter", false, "Don't (re)compile the current Flutter project, useful when only working with Golang code (plugin)")
0 commit comments