[√] Flutter (Channel unknown, v1.10.12, on Microsoft Windows [Version 10.0.18362.388], locale zh-TW)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] VS Code, 64-bit edition (version 1.38.1)
[!] Connected device
! No devices available
Just add a SelectableText with some text, and It's not copyable with ctrl+c. Maybe It's designed to use popup copy in mobile, but there is no function supported in desktop?
I just spend a loot of time looking at SelectableText (https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/selectable_text.dart) and from my undersanding the flutter/flutter framework doesn't exposes the text selection value with the embedder (us: go-flutter, who handles ctrl-c)
The SelectableText isn't sending message to the embedder because of this. (Commenting the return makes ctrl-c work but it is a major work-around^^)
The line needed to notify the embedder (go-flutter) editing state: setEditingState (calls to a platform method channel here)
Can you please open a issue on flutter/flutter?
(and reference this issue in the flutter/flutter tracker if needed)
Tagging as wontfix for now, because it's not related to go-flutter
Thanks for taking care this issue! I opened this issue 😄
This issue is fixed in Flutter 1.12 stable.
❯ flutter --version
Flutter 1.12.13+hotfix.5 • channel stable • https://github.com/flutter/flutter
Framework • revision 27321ebbad (2 weeks ago) • 2019-12-10 18:15:01 -0800
Engine • revision 2994f7e1e6
Tools • Dart 2.7.0
The flutter/flutter framework is using the "flutter/keyevent" BasicMessageChannel to register the copy event on the framework side.
The framework is then sending the text content through the "Clipboard.setData" method of "flutter/platform" in the same manner as it is done when the user clicks the copy popup button.
As we are using RawKeyEventDataLinux (GLFW compatible) this means the flutter framework would need have different handles for modifier keys on different platforms. i.e. different handles on (linux/macos/window) (ctrl-c vs cmd-c) for the SAME render-er backend (GLFW in your case).
The issue of using the flutter/keyevent to interact with keyboard shortcut/text movement is described in https://github.com/go-flutter-desktop/go-flutter/issues/314.
Closing this issue.