Code Monkey home page Code Monkey logo

go-flutter's People

Contributors

alex-min avatar artob avatar befovy avatar bltavares avatar davidmartos96 avatar dependabot[bot] avatar geertjohan avatar geoah avatar gitter-badger avatar james-lawrence avatar jslater89 avatar mareenakunjachan avatar matthiasn avatar pas2k avatar pchampio avatar rafaelring avatar renovate-bot avatar renovate[bot] avatar stefanlobbenmeier avatar titouant avatar tluyben avatar totallygamerjet avatar zephylac avatar zet4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-flutter's Issues

I don't get it, what's the use of go here?

So, this isn't an issue but rather a question. As far as i can see we're still building the application itself in Dart? and go is just running as a wrapper? If so how's that Single Codebase in the readme 😄
Did you mean single go codebase or single dart codebase?

Again, Sorry for opening this as an issue =)

Keyboard layout

Flutter version

Flutter 1.0.0 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (2 weeks ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

Does the prebuilt and portable version works ?

Yes

Download Link
  • Yes
  • No

Steps to Reproduce

glfw.SetKeyCallback doesn't support keyboard layout. It only support US layout. Documentation.
Whereas glfwSetCharCallbackwill support layout
This has for consequence to miss understand event but since we get actual key value from glfwSetCharCallback you will write what your keyboard is supposed to write.

For example if you have an AZERTY keyboard. When pressing A, glfw.keyQ event will be recorded but glfwCharCallback will know you are under another layout and will write A to your screen.
This problem breaks shortcuts under all operating system.

Index out of range, When selecting the EngineOpenGL

Hi, I made a app to receive data from internet (on the flutter side) and persist on the SQLite (using the JSONMessageCodec and the pluginReceiver) but I'm receiving this error sometimes when the memory usage exceeds 200mb

panic: runtime error: index out of range
goroutine 17 [running, locked to thread]:
github.com/Drakirus/go-flutter-desktop-embedder/flutter.proxy_make_current(0x6812490, 0x4320870)
/go/src/github.com/Drakirus/go-flutter-desktop-embedder/flutter/flutter_proxy_glfw.go:43 +0xd2
github.com/Drakirus/go-flutter-desktop-embedder/flutter._cgoexpwrap_e5bc8fd1c1b7_proxy_make_current(0x6812490, 0x23ff7e00)
_cgo_gotypes.go:376 +0x2b

Am I doing something wrong?

Thanks.

Multi-monitor support for pixel ratio

The pixel_ratio is calculated using the primary monitor. Instead we want to detect on which physical display the GLFW window resides, and use the metrics for that display to calculate the correct pixel_ratio.

Allow Scrolling

I think it would be cool if you could scroll with a mouse instead of having to drag! That's all, great project.

is it possible that flutter rules all?

by porting to WebGL through OpenGL?

https://github.com/goxjs/glfw (Go cross-platform glfw library for creating an OpenGL context and receiving events.)
https://github.com/goxjs/gl (Go cross-platform OpenGL bindings.)

https://github.com/gopherjs/gopherjs/wiki/bindings
Isomorphic Libraries
These libraries expose the same API for native architectures (386, amd64, arm) and js architecture. Using them allows writing isomorphic Go code (same Go code that can run in backend and frontend).
GLFW: https://github.com/goxjs/glfw
OpenGL ES-like unified API: https://github.com/goxjs/gl
WebSocket client: https://github.com/goxjs/websocket

and Gopherjs WebGL: https://github.com/gopherjs/webgl

You are doing a great job. Thanks.

Any thoughts?

Feature: Printing via Screen shotting

This looks like an excellent basis.

https://github.com/DavBfr/dart_pdf
It can take a screenshot and then output as as PDF and then Share / Print.

Taking a screenshot is a bit hacky to purists, but way let work than converting Dart AST layout to PDF.
SO its not a bad solution in terms of easy but effective in 90% of cases approach i feel.

In progres is the ability to take a PNG of a Flutter VIew that is larger than the page. For example when you have a large scroll list.
See: DavBfr/dart_pdf#28

I think the plugin ( java, swift) code can be replaced with pure golang stuff reasonably easily.
The Dart code looks very promising. I would like to collaborate rather than fork, because it would be very useful to the community to have plugins that work on mobile and Desktop. Now that we have the downloader it starts to be pretty easy i think.

memory leak in proxy_on_platform_messsage.

see documentation

func proxy_on_platform_message(message *C.FlutterPlatformMessage, userPointer unsafe.Pointer) C.bool {
	if message.message != nil {
		str := C.GoString(C.converter(message.message, message.message_size))

		FlutterPlatformMessage := PlatformMessage{}

		messageContent := Message{}
		json.Unmarshal([]byte(str), &messageContent)

		FlutterPlatformMessage.Message = messageContent
		FlutterPlatformMessage.Channel = C.GoString(message.channel)
		if message.response_handle == nil {
			fmt.Println("==================== NIL")
		}

		return C.bool(globalFlutterOpenGL.FPlatfromMessage(FlutterPlatformMessage, userPointer))
	}
	return C.bool(false)

}
if message.response_handle == nil

should be

FlutterPlatformMessage.ResponseHandle = (*platformMessageResponseHandle)(message.response_handle)

we would still need to handle the response later on but this moves the needle in the right direction.

Poor CPU performance.

Flutter version

$ flutter --version
Flutter 1.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (6 weeks ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

Does the prebuilt and portable version works ?

Download Link
  • Yes

Steps to Reproduce

  1. Run any flutter app (including the samples provided with the project)
  2. Observe abnormal CPU usage (10-15% on idle)

Notes

I have not tested google's version of this as I never got it to build correctly. Hence I am not sure if this is a normal behaviour for flutter on desktop, but I am hoping it's not.

I have also attempted to implement FPS limit in the "game" loop of GLFW, but that didn't do anything to throttle this thing's greed for computing.

Take screenshot of the OpenGL window

Just raising this as a placeholder as we will need printing.
DO you want to add this to the readme TODO list ?

https://github.com/alexbrainman/printer

  • Windows Printing. Works well.

The big question is how to get Print a Flutter Page. I see two approaches

  1. Use PDF, and so you need to write code ( in golang) to output a PDF
  • Good:
    - Nice for Report generation where whats on the Flutter Page is different than whats on.
  • Bad:
    - Requires writing PDF code for every screen. Tedious
  1. Use Flutter to take a screenshot of the Flutter Page or Widget
  • Then just embed it into a PDF and send it off to the Printer

GO Fatal whilst running

Windows 10

Flutter version

$ flutter --version
Flutter 1.0.0 ⢠channel stable ⢠https://github.com/flutter/flutter.git
Framework ⢠revision 5391447fae (7 weeks ago) ⢠2018-11-29 19:41:26 -0800
Engine ⢠revision 7375a0f414
Tools ⢠Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

Golang errors (Optional)

Get this error whilst the program is running

Check failed: loop != nullptr. MessageLoop::EnsureInitializedForCurrentThread was not called on this thread prior to message loop use.
exit status 3221226505

Does the prebuilt and portable version works ?

Download Link
  • Yes

Steps to Reproduce

There is no clear way for me to replicate without providing the executable to my project.

Error mingw ld - cannot find -lflutter_engine

When I attempt to run go get -u -v github.com/Drakirus/go-flutter-desktop-embedder on Windows, following your instructions, I get the following error:

c:/winbuilds/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lflutter_engine
collect2.exe: error: ld returned 1 exit status

I did run the flag command from your instructions first.
Am I doing something wrong?

Mage based building & ci

Hopefully anyone reading this knows what golang mage is and the problems it solves for cross platform building - especially on desktops.

I think a mage script will really help the pace and regressions.

A great example of using it is elastic beats repo.

https://github.com/elastic/beats

For with does,Mac and Linux there is a make file that checks mage is installed and them mage all the way from there.
You can do exactly the same in CI on Travis, appveyor, etc etc.

I would start with the basics like beats does and then extend from there.

They also can build and sign golang apps for desktop and build installers for both platforms ! All from golang.

Give it a look ...

Can not download/build under Windows 10

Hi, i can not download under windows 10

go run engineDownloader.go

Downloading file from
 'https://storage.googleapis.com/flutter_infra/flutter/72c7a7567228cdaf8b7aa4a9e3d212ef9d4cc0ed/windows-x64/windows-x64-embedder'
 to 'C:\src\flutter_projects\go-flutter-desktop-embedder\example\simpleDemo/.build/temp.zip'

Download completed in 1.5597002s3 �[2K
Downloaded embedder for windows-x64 platform, matching version : 72c7a7567228cdaf8b7aa4a9e3d212ef9d4cc0ed
Downloading file from
 'https://storage.googleapis.com/flutter_infra/flutter/72c7a7567228cdaf8b7aa4a9e3d212ef9d4cc0ed/windows-x64/artifacts.zip'
 to 'C:\src\flutter_projects\go-flutter-desktop-embedder\example\simpleDemo/.build/artifacts.zip'

Download completed in 8.5188025s �[2K
Downloaded artifact for windows-x64 platform.
2018/11/30 10:58:32 zip: not a valid zip file
exit status 1

Inappropriate use of c_ulong

go version : go1.11.2 windows/amd64

github.com/Drakirus/go-flutter-desktop-embedder/flutter

......\github.com\Drakirus\go-flutter-desktop-embedder\flutter\flutter.go:200:17: cannot use _Ctype_ulong(len(data)) (type _Ctype_ulong) as type _Ctype_ulonglong in argument to func literal

PlatformError: GLX: Failed to make context current

I'm seeing an issue that I've seen before. I know how it can be fixed, but I'm not succeeding in applying the fix to this project.

In flutter-desktop-embedding I encountered an error that was caused by improper resolving of GL functions. The Flutter>Skia>GL rendering would assume the wrong GL context and resolved the wrong procs, ending up in a bunch of errors. Providing flutter with a glfw proc resolver fixed the issue. This occurs on machines with multiple video cards (e.g.: intel graphics as part of the CPU and an nvidia card for when there's some actual GPU power required).

This issue was fixed in flutter-desktop-embedding by the following PR: google/flutter-desktop-embedding#184

I really like Go, have been working with it since before Go v 1.0. So obviously I wanted to try this project as well. I tried to rework the fix over for this project, but ran into a few issues.

First of all, the go-gl/glfw project doesn't expose glfwGetProcAddress.
There's an open issue about it: go-gl/glfw#234

I tried to start patching this by using glfw directly. Not as a permanent solution, but just to try out the fix and create a use-case example for go-gl/glfw to expose glfwGetProcAddress. However, it's not working, compile warning on the proxy function I made, I'm probably doing something wrong in C land.
The changes I made are visible here: master...GeertJohan:feature/add-gl-proc-resolver

The compile error on my feature branch:

# github.com/Drakirus/go-flutter-desktop-embedder/flutter
/tmp/go-build300793477/b036/_x004.o: In function _cgo_b8b7151b1d3c_Cfunc_glfwGetProcAddress': /tmp/go-build/cgo-gcc-prolog:61: undefined reference to glfwGetProcAddress'
/tmp/go-build300793477/b036/_x005.o: In function runFlutter': ../../flutter/flutter_helper.c:31: undefined reference to proxy_gl_proc_resolver'
collect2: error: ld returned 1 exit status

Edit: The quick'n'dirty fix works now. See comment below.

Note that I had to copy over some of the new fields and structs of the embedder API to get access to the gl_proc_resolver parameter.

I hope we may be able to fix this, preferably by having glfwGetProcAddress exposed from the go-gl/glfw package. Any help is welcome.

Flutter version

Flutter 1.2.1 • channel dev • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (2 days ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

Does the prebuilt and portable version works ?

  • No

Steps to Reproduce

  1. Build following the instructions
  2. Run the binary (./main)

[WARNING:flutter/shell/platform/embedder/embedder.cc(312)] FlutterProjectArgs.main_path is deprecated and should be set null.
[WARNING:flutter/shell/platform/embedder/embedder.cc(317)] FlutterProjectArgs.packages_path is deprecated and should be set null.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(89)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
[ERROR:flutter/shell/gpu/gpu_surface_gl.cc(85)] Failed to setup Skia Gr context.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(89)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter: Observatory listening on http://127.0.0.1:50300/
2019/02/16 16:28:59 PlatformError: GLX: Failed to make context current
[1] 18962 segmentation fault (core dumped) ./main

Why is the compiled project showing a blank?

I created a new default flutter project and compiled it. Why does the window title show Loading and the view content is blank when running main.exe? The demo in the build project can be displayed normally.
I am compiling the new flutter project by replacing the demo of the original project.
Is this the wrong way to compile?

Multiple TextField support

The current textModel is only working when there is one TextField displayed.

Reproduce the bug by using the simpleDemo example. The embedder crash when words are typed in a TextField when there is another TextField displayed on the screen that has been filled.

panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/Drakirus/go-flutter-desktop-embedder.(*textModel).addChar(0x634080, 0xc0000a9c74, 0x1, 0x1)
        /home/drakirus/lab/go/src/github.com/Drakirus/go-flutter-desktop-embedder/textModel.go:32 +0x15e
github.com/Drakirus/go-flutter-desktop-embedder.glfwCharCallback(0xc0000b6000, 0x66)
        /home/drakirus/lab/go/src/github.com/Drakirus/go-flutter-desktop-embedder/gutter.go:198 +0x76
github.com/go-gl/glfw/v3.2/glfw.goCharCB(0xef9990, 0x66)
        /home/drakirus/lab/go/src/github.com/go-gl/glfw/v3.2/glfw/input.go:294 +0x51
github.com/go-gl/glfw/v3.2/glfw._cgoexpwrap_f7a05a868eb7_goCharCB(0xef9990, 0x66)
        _cgo_gotypes.go:2147 +0x33
github.com/go-gl/glfw/v3.2/glfw._Cfunc_glfwPollEvents()
        _cgo_gotypes.go:1196 +0x41
github.com/go-gl/glfw/v3.2/glfw.PollEvents()
        /home/drakirus/lab/go/src/github.com/go-gl/glfw/v3.2/glfw/window.go:777 +0x20
github.com/Drakirus/go-flutter-desktop-embedder.Run(0xc0000a9f70, 0x3, 0x3, 0x0, 0x0)
        /home/drakirus/lab/go/src/github.com/Drakirus/go-flutter-desktop-embedder/gutter.go:80 +0x21d
main.main()
        /home/drakirus/lab/go/src/go-flutter-desktop-embedder/example/demo/main.go:25 +0xc6

Provide a working set default Option values

gutter.OptionAssetPath(dir + "/flutter_project/demo/build/flutter_assets"),
gutter.OptionICUDataPath("/opt/flutter/bin/cache/artifacts/engine/linux-x64/icudtl.dat"),
gutter.OptionWindowInitializer(setIcon),
gutter.OptionWindowDimension(800, 600),
gutter.OptionWindowInitializer(setIcon),
gutter.OptionPixelRatio(1.9),
gutter.OptionVmArguments([]string{"--dart-non-checked-mode", "--observatory-port=50300"}),

Those option are not realy Optional the. OptionAssetPath and OptionICUDataPath are in the needs of a rename.
Some checking could also be made. To ensure the validity of the AssetPath and ICUDataPath.
WindowDimension should be > 0, and so on..

Plugins support

These are two desktop services I am thinking of adding and I want feedback

  1. Notifications.
    There are good golang packages for this so should be easy to do native notification.

  2. Unilinks is when a user gets an email with a deeplinking into the flutter app. When they click the link it opens the flutter app and routes into the link.
    Unilinks is the name of the flutter for mobile plugin and so we can reuse the Dart code and replace the java and objective c with golang. I am not sure what's already out there in terms of golang libs for this but I am confident it's doable.

  3. Printing
    Dart has pdf gen but golang has great pdf gen. Assuming we want to go with the PDF approach ? Other way is to take a screen Scape raster image and bundle it inside a pdf. Both are useful.
    Then there is sending it to a printer. There are some decent golang libs for this.

If I can get feedback, and I will start working on these.

embedder.go:140:15: identifier "_Ctype_FlutterPointerPhase" may conflict with identifiers generated by cgo

go get -u -v github.com/go-flutter-desktop/go-flutter

github.com/go-flutter-desktop/go-flutter (download)
github.com/go-gl/glfw (download)
github.com/go-flutter-desktop/go-flutter/embedder

github.com/go-flutter-desktop/go-flutter/embedder

../../../github.com/go-flutter-desktop/go-flutter/embedder/embedder.go:140:15: identifier "_Ctype_FlutterPointerPhase" may conflict with identifiers generated by cgo

go version go1.12 darwin/amd64

flutter --version

Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (il y a 2 semaines) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

file was built for unsupported file format on Mac

GitHub/go-flutter-desktop-embedder/example/simpleDemo/FlutterEmbedder.framework/FlutterEmbedder, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E 0x74 ) which is not the architecture being linked (x86_64): GitHub/go-flutter-desktop-embedder/example/simpleDemo/FlutterEmbedder.framework/FlutterEmbedder
Undefined symbols for architecture x86_64:

Improve performance by providing a resource context

Flutter prints this error. The feature is actually an optional feature, but highly recommended.

[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(89)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.

Flutter (Channel beta), v1.2.1 is released!

The Changelog contains 2 Embedder API changes:

#7497 Embedder API: main_path and packages_path in FlutterProjectArgs have been renamed to indicate that they should no longer be provided.
#7567 Embedder API: The FlutterResult type has been renamed to FlutterEngineResult.

improvements: make this library importable instead of forcing it to be the top level.

still playing with the code, but think this should work closer to how go-gl/glfw works where you can just import and go.

  • figure out a way of statically linking the flutter engine.
  • remove main function and expose a top level package function that perform the same work.

been working on getting these changes to work running into issues with the shared library, which i haven't had a chance to track down. basically go is having trouble loading the library but isn't being clear on where its looking.

Arabic font support

Flutter version

Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (2 weeks ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)


## Does the prebuilt and portable version works ?
 - Yes 
## Steps to Reproduce

1. Arabic language support - currently my Linux machine shows nothing for Arabic. 
Screenshot :
https://ibb.co/6nrDrZs
https://ibb.co/bLzvG4d (Modifying first row in Stock App with Arabic strings)
Mobile Screenshot :
https://ibb.co/tLjZMmd

Flutter version 0.7.3 - Engine run configuration was invalid

flutter --version
Flutter 0.7.3 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 3b309bda07 (il y a 12 jours) • 2018-08-28 12:39:24 -0700
Engine • revision af42b6dc95
Tools • Dart 2.1.0-dev.1.0.flutter-ccb16f7282

On the v0.5.1 the embedder is running correctly, but on the latest 0.7.3 it throws

[ERROR:flutter/shell/common/engine.cc(109)] Engine run configuration was invalid.
[ERROR:flutter/shell/platform/embedder/embedder_engine.cc(65)] Could not launch the engine with configuration.

Molten / Vulkan / Metal support

I get warnings all the time about openGL being deprecated in the future because of Apple moving to Molten ( Apple's version of Vulkan / Metal ).
Skia and Flutter can do Vulkan on Desktop ( and mobile) and so that is not going to be an issue, but the golang openGL, GLFW will be a problem soon.

Would be good to look into what else is out there for Golang on MacOS to solve this that will eventually hit.
There is decent Vulkan support for golang to do windowing etc.

Edit: On doing a bit of research it might be fine. There is a project where they are using golang GLFW on Metal.
See here: go-gl/glfw#219 (comment)

Specify a custom Entrypoint

Hello,

Thanks for your excellent work on this project!
In my Flutter application, I am not using the default file as entrypoint (main.dart), but a different one.

When building an Android or iOS app, I just have to specify which file I want to use with the -t arg:

flutter build apk --release -t lib/main-dev.dart

How can I pass this argument?

Thanks!

How to build the examples?

I'm new at Go, but I'm pretty sure I have it installed properly. I'm on Mac Mojave. How do I build the example apps?

MacOS support

First of, thanks for sharing your work! It's great to see another approach available.

In readme you mentioned MacOS support is planned. Wondering what's the state on this front?

I'd like to explore this as well but have little knowledge of golang myself. It would be a lot easier for me to contribute when/if there is some scaffolding for macOS is in place already.

Move repository to go-flutter-desktop organisation

As I'm less and less maintaining this repository due to my studies, it would be better to move it to a "@flutter-desktop" "@go-flutter-desktop" organization.

Having 1,500+ stargazer only meant one thing: The community is in the needs.
Sadly I cannot invest enough time into the project, and it's time for me to admit that this side project of mine has gained too much interest that I can't assume.

Having an organization as the owner would allow Collaborator like @GeertJohan, to contribute without have to deal with me.

As per Github documentation, a transfer automatically redirects links, resources, and etc as opposed to a fork which does none of those things.

I am planning to transfer the repo in the next few days. If you have anything to say, please comment!

Pierre.

MacOS shortcut support

Flutter version

Flutter 1.0.0 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (2 weeks ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

Does the prebuilt and portable version works ?

Yes

Download Link
  • No

Steps to Reproduce

Under MacOS High Sierra 10.13.6, shortcuts doesn't works. I also tested on MacOS Mojave, I would assume it won't work on any MacOS.

After doing so testing. When checking for copy and paste, the key cmd is not tested.
Current: mods == glfw.ModControl
Fix : (mods == glfw.ModControl || mods == glfw.ModSuper)

This fix might broke copy and paste from other architecture since I didn't check if glfw.ModSuper is fired when pressing windows or linux key on keyboard.

I'm working on a fix right now.

Look into use the new Dart / Flutter FFI under development

flutter/flutter#7053

  • follow the link at the bottom and down the rabbit hole.

Basically it will mean you can take your golang code and compile it to a shared lib for Mobile and Desktop.


CC="${NDK_DIR}/bin/arm-linux-androideabi-gcc" \
CXX="${NDK_DIR}/bin/arm-linux-androideabi-g++" \
CGO_ENABLED=1 CGO_CFLAGS="-march=armv7-a" \
GOOS=android GOARCH=arm GOARM=7 \
go build -i -buildmode=c-shared -o libgomain.so

Why its a feasible approach:

  1. speed.
  2. agnostic. The same code for Desktop and Mobile can be plugged into Flutter in the exact same way.

when ?
Q1 2019 they say.

Unable to build on Windows 10

I get the following when attempting to run build simpleDemo:

....\flutter\flutter.go:177: cannot use C.uintptr_t(len(strMessage)) (type C.uintptr_t) as type C.size_t in field value

Video Player Plugin

I'm attempting to use the video_player plugin but it doesn't appear to instalize.

Is this plugin supported? If not, when can I expect this to work as it is a crucial part to my project.

Thank you.

mac: wrong directory

Precondition

  • macOS Sierra
  • dart v2.1.0 installed via brew, flutter SDK not installed
  • prebuild binary v0.3.0-alpha from github

Does the prebuilt and portable version works ?

No

Download Link
- [x] Yes
- [ ] No

Steps to Reproduce

  1. Unzip downloaded binary
  2. Run stocks
  3. Console shows error:
    2018/12/24 08:40:03 stat /Users/tbrocherieux/Downloads/stocks-example-GoFlutter_OSX/flutter_project/stocks/build/flutter_assets: no such file or directory

flutter: The following NoSuchMethodError was thrown building IconTheme

https://medium.com/flutter-community/flutter-from-mobile-to-desktop-93635e8de64e

But have following issue

flutter: Observatory listening on http://127.0.0.1:50300/
flutter: тХРтХРтХб EXCEPTION CAUGHT BY WIDGETS LIBRARY тХЮтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХР
flutter: The following NoSuchMethodError was thrown building IconTheme(IconThemeData#2abdc(color:
flutter: Color(0xdd000000))):
flutter: Class 'Window' has no instance getter 'locales'.
flutter: Receiver: Instance of 'Window'
flutter: Tried calling: locales
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
flutter: #1      _WidgetsAppState.initState (package:flutter/src/widgets/app.dart:716:41)
flutter: #2      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3830:58)
flutter: #3      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #4      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #5      Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #7      Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #8      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #9      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #10     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #11     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #12     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #13     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #14     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #15     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #16     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #17     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #18     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #19     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #20     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #21     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #22     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #23     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #25     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #26     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #27     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
flutter: #28     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #32     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #33     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #34     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #35     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #36     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #38     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #39     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #40     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
flutter: #41     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #42     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #43     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #44     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #45     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #46     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #47     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
flutter: #48     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #49     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #50     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #51     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:909:16)
flutter: #52     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:880:5)
flutter: #53     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:826:17)
flutter: #54     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2266:19)
flutter: #55     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:825:13)
flutter: #56     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:712:7)
flutter: #57     runApp (package:flutter/src/widgets/binding.dart:756:7)
flutter: #58     main (package:flutter_gallery/main.dart:26:3)
flutter: #59     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:289:19)
flutter: #60     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
flutter: тХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХР

Originally posted by @KanybekMomukeyev in #36 (comment)

Check failed: context->IsValid()

Hi, thanks for sharing, I followed tutor for MacOs
but have following issue, what can cause this error?

[FATAL:flutter/fml/icu_util.cc(86)] Check failed: context->IsValid(). Must be able to initialize the ICU context. Tried: /opt/flutter/bin/cache/artifacts/engine/linux-x64/icudtl.dat
SIGABRT: abort
PC=0x7fff5d257b66 m=0 sigcode=0

goroutine 0 [idle]:
runtime: unknown pc 0x7fff5d257b66
stack: frame={sp:0x7ffeefbfda88, fp:0x0} stack=[0x7ffeefb804c8,0x7ffeefbff530)
00007ffeefbfd988:  0000000000000000  0000000000000000 
00007ffeefbfd998:  0000000000000000  0000000000000000 
00007ffeefbfd9a8:  0000000000000000  0000000000000000 
00007ffeefbfd9b8:  0000000000000000  00007fff95bee1a8 
00007ffeefbfd9c8:  00007ffeefbfda30  0000000000000002 
00007ffeefbfd9d8:  00007ffeefbfda38  00007ffeefbfda00 
00007ffeefbfd9e8:  0000040000000400  00007fff95bee240 
00007ffeefbfd9f8:  00007ffeefbfda60  0000000000000002 
00007ffeefbfda08:  00007ffeefbfda68  00007ffeefbfda30 
00007ffeefbfda18:  00007fff5d191d89  00007fff95bee240 
00007ffeefbfda28:  0000000000000000  00007ffeefbfda50 
00007ffeefbfda38:  00007fff5d192334  0000000000000003 
00007ffeefbfda48:  0000000000000000  00007ffeefbfdaa0 
00007ffeefbfda58:  00007fff5b069a70  00007fff95bee240 
00007ffeefbfda68:  00007fff95bedca0  00007fff5d192366 
00007ffeefbfda78:  0000000000000000  00007ffeefbfdac0 
00007ffeefbfda88: <00007fff5d422080  00007fff95c0f380 
00007ffeefbfda98:  00007ffeefbfdad8  000000000549e1c0 
00007ffeefbfdaa8:  00007ffeefbfe5e0  00007ffeefbfdb60 
00007ffeefbfdab8:  000000000000000a  00007ffeefbfdaf0 
00007ffeefbfdac8:  00007fff5d1b31ae  0000000000000400 
00007ffeefbfdad8:  00000000ffffffdf  ffffffffefbfdb40 
00007ffeefbfdae8:  00007ffeefbfdb58  00007ffeefbfdb40 
00007ffeefbfdaf8:  00000000042fd7fa  00007ffeefbfdb58 
00007ffeefbfdb08:  00000000000000c1  00000000000000b6 
00007ffeefbfdb18:  0000000005d780b0  08e027a4bbe90012 
00007ffeefbfdb28:  00007ffeefbfe840  00007ffeefbfdb58 
00007ffeefbfdb38:  00007ffeefbfdce8  00007ffeefbfdc90 
00007ffeefbfdb48:  00000000042fcf8e  0000000000000000 
00007ffeefbfdb58:  0000000005489058  0000000005488fd0 
00007ffeefbfdb68:  00007fff955029e0  0000000000000000 
00007ffeefbfdb78:  0000000000000000  0000000000000000 
runtime: unknown pc 0x7fff5d257b66
stack: frame={sp:0x7ffeefbfda88, fp:0x0} stack=[0x7ffeefb804c8,0x7ffeefbff530)
00007ffeefbfd988:  0000000000000000  0000000000000000 
00007ffeefbfd998:  0000000000000000  0000000000000000 
00007ffeefbfd9a8:  0000000000000000  0000000000000000 
00007ffeefbfd9b8:  0000000000000000  00007fff95bee1a8 
00007ffeefbfd9c8:  00007ffeefbfda30  0000000000000002 
00007ffeefbfd9d8:  00007ffeefbfda38  00007ffeefbfda00 
00007ffeefbfd9e8:  0000040000000400  00007fff95bee240 
00007ffeefbfd9f8:  00007ffeefbfda60  0000000000000002 
00007ffeefbfda08:  00007ffeefbfda68  00007ffeefbfda30 
00007ffeefbfda18:  00007fff5d191d89  00007fff95bee240 
00007ffeefbfda28:  0000000000000000  00007ffeefbfda50 
00007ffeefbfda38:  00007fff5d192334  0000000000000003 
00007ffeefbfda48:  0000000000000000  00007ffeefbfdaa0 
00007ffeefbfda58:  00007fff5b069a70  00007fff95bee240 
00007ffeefbfda68:  00007fff95bedca0  00007fff5d192366 
00007ffeefbfda78:  0000000000000000  00007ffeefbfdac0 
00007ffeefbfda88: <00007fff5d422080  00007fff95c0f380 
00007ffeefbfda98:  00007ffeefbfdad8  000000000549e1c0 
00007ffeefbfdaa8:  00007ffeefbfe5e0  00007ffeefbfdb60 
00007ffeefbfdab8:  000000000000000a  00007ffeefbfdaf0 
00007ffeefbfdac8:  00007fff5d1b31ae  0000000000000400 
00007ffeefbfdad8:  00000000ffffffdf  ffffffffefbfdb40 
00007ffeefbfdae8:  00007ffeefbfdb58  00007ffeefbfdb40 
00007ffeefbfdaf8:  00000000042fd7fa  00007ffeefbfdb58 
00007ffeefbfdb08:  00000000000000c1  00000000000000b6 
00007ffeefbfdb18:  0000000005d780b0  08e027a4bbe90012 
00007ffeefbfdb28:  00007ffeefbfe840  00007ffeefbfdb58 
00007ffeefbfdb38:  00007ffeefbfdce8  00007ffeefbfdc90 
00007ffeefbfdb48:  00000000042fcf8e  0000000000000000 
00007ffeefbfdb58:  0000000005489058  0000000005488fd0 
00007ffeefbfdb68:  00007fff955029e0  0000000000000000 
00007ffeefbfdb78:  0000000000000000  0000000000000000 

goroutine 1 [syscall]:
runtime.cgocall(0x40ea080, 0xc00009bbe8, 0x29)
	/usr/local/go/src/runtime/cgocall.go:128 +0x5e fp=0xc00009bbb0 sp=0xc00009bb78 pc=0x400582e
github.com/Drakirus/go-flutter-desktop-embedder/flutter._Cfunc_runFlutter(0x5c03d00, 0xc0000783c0, 0xc000060180, 0x5c4e810, 0x3, 0x0)
	_cgo_gotypes.go:327 +0x4d fp=0xc00009bbe8 sp=0xc00009bbb0 pc=0x40e34ad
github.com/Drakirus/go-flutter-desktop-embedder/flutter.(*EngineOpenGL).Run.func2(0x5c03d00, 0xc0000783c0, 0xc000060180, 0x5c4e810, 0x3, 0xc00000e0b0)
	/Users/user/Desktop/gocode/src/github.com/Drakirus/go-flutter-desktop-embedder/flutter/flutter.go:78 +0x164 fp=0xc00009bc28 sp=0xc00009bbe8 pc=0x40e4af4
github.com/Drakirus/go-flutter-desktop-embedder/flutter.(*EngineOpenGL).Run(0xc0000783c0, 0x5c03d00, 0xc0000841e0, 0x3, 0x3, 0xc00000e0a8)
	/Users/user/Desktop/gocode/src/github.com/Drakirus/go-flutter-desktop-embedder/flutter/flutter.go:78 +0x21e fp=0xc00009bcb8 sp=0xc00009bc28 pc=0x40e3d1e
github.com/Drakirus/go-flutter-desktop-embedder.runFlutter(0xc0000a8080, 0x320, 0x258, 0xc00001e200, 0x78, 0x4145879, 0x3c, 0x4146178, 0x3ff3333333333333, 0xc0000841e0, ...)
	/Users/user/Desktop/gocode/src/github.com/Drakirus/go-flutter-desktop-embedder/gutter.go:236 +0x22b fp=0xc00009bd68 sp=0xc00009bcb8 pc=0x40e645b
github.com/Drakirus/go-flutter-desktop-embedder.Run(0xc0000a8000, 0xa, 0x10, 0x0, 0x0)
	/Users/user/Desktop/gocode/src/github.com/Drakirus/go-flutter-desktop-embedder/gutter.go:43 +0x2ee fp=0xc00009bec0 sp=0xc00009bd68 pc=0x40e57de
main.main()
	/Users/user/Desktop/Research/go-flutter-desktop-embedder/example/simpleDemo/main.go:37 +0x26e fp=0xc00009bf98 sp=0xc00009bec0 pc=0x40e966e
runtime.main()
	/usr/local/go/src/runtime/proc.go:201 +0x207 fp=0xc00009bfe0 sp=0xc00009bf98 pc=0x402d2f7
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc00009bfe8 sp=0xc00009bfe0 pc=0x40557c1

rax    0x0
rbx    0x7fff95c0f380
rcx    0x7ffeefbfda88
rdx    0x0
rdi    0x307
rsi    0x6
rbp    0x7ffeefbfdac0
rsp    0x7ffeefbfda88
r8     0x7fff95bee048
r9     0x40
r10    0x0
r11    0x206
r12    0x307
r13    0x7ffeefbfe5e0
r14    0x6
r15    0x2d
rip    0x7fff5d257b66
rflags 0x206
cs     0x7
fs     0x0
gs     0x0

How to release Windows desktop app, to be usable in another machine?

Hi, every time when i build from source code go build main.go

func main() {
	var (
		err error
	)

	_, currentFilePath, _, _ := runtime.Caller(0)
	dir := path.Dir(currentFilePath)
        //.....
}

Here the "dir path" is fixing my local path.
And whenever triying ro run in another machine, app crashes,
with error that app can not find my local path.

For example:

can not open C:/src/flutter_projects/go-flutter-desktop-embedder/example/simpleDemo/assets/icon.png: The system cannot find the path specified.

this is another machine, there should not be go-flutter-desktop-embedder

Or this kind of issue:

[FATAL:e:\b\build\slave\windows_engine\build\src\flutter\fml\icu_util.cc(92)] Check failed: context->IsValid(). Must be able to initialize the ICU context. Tried: C:/src/flutter_projects/go-flutter-desktop-embedder/example/simpleDemo/icudtl.dat

how can i write a "mian.go" and a "pubspec.lock"?

Flutter version 1.0.0

Thanks for your work than makes me successfully build the demo to a linux app.
But if i want to build a app for my own flutter project, how can i write a "mian.go" and the "pubspec.lock"?
I am new to go-lang as well as flutter.
can anybody tell me how to start?
Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.