Git Product home page Git Product logo

flutter-desktop-embedding's Introduction

Desktop Embedding for Flutter

This project was originally created to develop Windows, macOS, and Linux embeddings of Flutter. That work has since become part of Flutter, and all that remains here are experimental, early-stage desktop plugins.

If you want to get started with Flutter on desktop, the place to start is now the Flutter documentation, rather than this project. You will already need to have followed the instructions there to get an application running on desktop before using any of the plugins here.

Feedback

Do not file issues about Flutter for desktop here. Since the embeddings have all moved to the Flutter project, the place for desktop bugs and feature requests is now the Flutter issue tracker.

For bug reports and feature requests related to the plugins in this repository, please file issues here.

Repository Structure

The plugins directory contains all the plugins. See its README to get started.

Caveats

  • This is not an officially supported Google product.

flutter-desktop-embedding's People

Contributors

awdavies avatar badpx avatar callumiddon avatar canewsin avatar chunhtai avatar clarkezone avatar cloudwebrtc avatar domesticmouse avatar evilbird avatar franciscojma86 avatar geertjohan avatar hpoul avatar jbg avatar jonahwilliams avatar kenvandine avatar krisgiesing avatar lesnitsky avatar marcustomlinson avatar maun avatar migarl avatar mtcliatt avatar pklebba avatar rashedmyt avatar robert-ancell avatar shoryukenn avatar stuartmorgan avatar sunbreak avatar technolion avatar vially avatar xuexin 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

flutter-desktop-embedding's Issues

Provide a richer plugin API that handles responses

Currently the fiddly details of constructing an appropriate response object to a platform channel call is left to each plugin. We should change the plugin API to provide functionality that abstracts away those details.

It would also be worth looking at any structural differences between the iOS/Android plugin channel API abstractions and the desktop plugin abstractions; ideally they should look as similar as possible so that writing plugins on desktop doesn't feel significantly different from writing them on mobile.

linux: segfault

It opens a window but then crashes.

Here's a short backtrace:

#0  dart::Class::num_type_arguments (this=0x7fffe00bd600) at ../../third_party/dart/runtime/vm/object.h:1508
#1  dart::Class::NumTypeArguments (this=0x7fffe00bd600) at ../../third_party/dart/runtime/vm/object.cc:2505
#2  0x00007ffff4e48856 in dart::kernel::StreamingConstantEvaluator::EvaluateConstructorInvocationInternal (this=0x7fffe7ff9498) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:3211
#3  0x00007ffff4e46c2f in dart::kernel::StreamingConstantEvaluator::EvaluateExpression (this=0x7fffe7ff9498, offset=3896, reset_position=false) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:2798
#4  0x00007ffff4e49e04 in dart::kernel::StreamingConstantEvaluator::EvaluateMapLiteralInternal (this=0x7fffe7ff9498) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:3414
#5  0x00007ffff4e46e94 in dart::kernel::StreamingConstantEvaluator::EvaluateExpression (this=0x7fffe7ff9498, offset=3878, reset_position=false) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:2825
#6  0x00007ffff4e4c13e in dart::kernel::StreamingConstantEvaluator::RunFunction (this=0x7fffe7ff9498, function=..., argument_count=<optimized out>, receiver=<optimized out>, type_args=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:3565
#7  0x00007ffff4e48a42 in dart::kernel::StreamingConstantEvaluator::EvaluateConstructorInvocationInternal (this=0x7fffe7ff9498) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:3238
#8  0x00007ffff4e46c2f in dart::kernel::StreamingConstantEvaluator::EvaluateExpression (this=0x7fffe7ff9498, offset=3861, reset_position=true) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:2798
#9  0x00007ffff4e4cca1 in dart::kernel::StreamingFlowGraphBuilder::BuildGraphOfFieldInitializer (this=0x7fffe7ff9470) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:3825
#10 0x00007ffff4e540fe in dart::kernel::StreamingFlowGraphBuilder::BuildGraph (this=0x7fffe7ff9470, kernel_offset=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:5053
#11 0x00007ffff4e77c12 in dart::kernel::FlowGraphBuilder::BuildGraph (this=0x7fffe7ff9600) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_to_il.cc:1960
#12 0x00007ffff4ea2d44 in dart::DartCompilationPipeline::BuildFlowGraph (this=<optimized out>, zone=<optimized out>, parsed_function=<optimized out>, ic_data_array=..., osr_id=<optimized out>, optimized=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:163
#13 0x00007ffff4ea5b49 in dart::CompileParsedFunctionHelper::Compile (this=0x7fffe7ff9e30, pipeline=0x7fffe7ff9e28) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:815
#14 0x00007ffff4ea8912 in dart::Compiler::EvaluateStaticInitializer (field=...) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:1453
#15 0x00007ffff4e47707 in dart::kernel::StreamingConstantEvaluator::EvaluateStaticGet (this=0x7fffe7ffb168) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:3048
#16 0x00007ffff4e46c08 in dart::kernel::StreamingConstantEvaluator::EvaluateExpression (this=0x7fffe7ffb168, offset=142, reset_position=true) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:2782
#17 0x00007ffff4e567a6 in dart::kernel::StreamingFlowGraphBuilder::BuildStaticGet (this=0x7fffe7ffb140, p=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:7113
#18 0x00007ffff4e4cfbf in dart::kernel::StreamingFlowGraphBuilder::BuildExpression (this=0x7fffe7ffb140, position=0xa) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:5102
#19 0x00007ffff4e64a89 in dart::kernel::StreamingFlowGraphBuilder::BuildArgumentsFromActualArguments (this=0x7fffe7ffb140, argument_names=0x7fffe00b4640, skip_push_arguments=false, do_drop=false) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:6575
#20 0x00007ffff4e4f815 in dart::kernel::StreamingFlowGraphBuilder::BuildArguments (this=0x7fffe7ffb140, argument_names=0x7fffe00b4640, argument_count=<optimized out>, positional_count=0x7fffe7ffaac0, skip_push_arguments=false, do_drop=false) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:6549
#21 0x00007ffff4e596ae in dart::kernel::StreamingFlowGraphBuilder::BuildStaticInvocation (this=0x7fffe7ffb140, is_const=<optimized out>, p=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:7636
#22 0x00007ffff4e4ce01 in dart::kernel::StreamingFlowGraphBuilder::BuildExpression (this=0x7fffe7ffb140, position=0xa) at ../../third_party/dart/runtime/vm/kernel_binary.h:220
#23 0x00007ffff4e64a89 in dart::kernel::StreamingFlowGraphBuilder::BuildArgumentsFromActualArguments (this=0x7fffe7ffb140, argument_names=0x7fffe00b4540, skip_push_arguments=false, do_drop=false) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:6575
#24 0x00007ffff4e4f815 in dart::kernel::StreamingFlowGraphBuilder::BuildArguments (this=0x7fffe7ffb140, argument_names=0x7fffe00b4540, argument_count=<optimized out>, positional_count=0x7fffe7ffaca0, skip_push_arguments=false, do_drop=false) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:6549
#25 0x00007ffff4e59e91 in dart::kernel::StreamingFlowGraphBuilder::BuildConstructorInvocation (this=0x7fffe7ffb140, is_const=<optimized out>, p=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:7741
#26 0x00007ffff4e4d008 in dart::kernel::StreamingFlowGraphBuilder::BuildExpression (this=0x7fffe7ffb140, position=0xa) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:5118
#27 0x00007ffff4e60f9e in dart::kernel::StreamingFlowGraphBuilder::BuildReturnStatement (this=0x7fffe7ffb140) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:9086
#28 0x00007ffff4e4f56d in dart::kernel::StreamingFlowGraphBuilder::BuildStatement (this=0x7fffe7ffb140) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:5231
#29 0x00007ffff4e5dd48 in dart::kernel::StreamingFlowGraphBuilder::BuildBlock (this=0x7fffe7ffb140) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:8482
#30 0x00007ffff4e4f4fd in dart::kernel::StreamingFlowGraphBuilder::BuildStatement (this=0x7fffe7ffb140) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:5203
#31 0x00007ffff4e531d7 in dart::kernel::StreamingFlowGraphBuilder::BuildGraphOfFunction (this=0x7fffe7ffb140, constructor=false) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:4837
#32 0x00007ffff4e53f7e in dart::kernel::StreamingFlowGraphBuilder::BuildGraph (this=0x7fffe7ffb140, kernel_offset=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc:5043
#33 0x00007ffff4e77c12 in dart::kernel::FlowGraphBuilder::BuildGraph (this=0x7fffe7ffb2d0) at ../../third_party/dart/runtime/vm/compiler/frontend/kernel_to_il.cc:1960
#34 0x00007ffff4ea2d44 in dart::DartCompilationPipeline::BuildFlowGraph (this=<optimized out>, zone=<optimized out>, parsed_function=<optimized out>, ic_data_array=..., osr_id=<optimized out>, optimized=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:163
#35 0x00007ffff4ea5b49 in dart::CompileParsedFunctionHelper::Compile (this=0x7fffe7ffbb50, pipeline=0x7fffe7ffc668) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:815
#36 0x00007ffff4ea6b1b in dart::CompileFunctionHelper (pipeline=<optimized out>, function=..., optimized=<optimized out>, osr_id=<optimized out>) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:999
#37 0x00007ffff4ea6502 in dart::Compiler::CompileFunction (thread=0x7fffe0055e50, function=...) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:1186
#38 0x00007ffff4ea32b4 in dart::DRT_HelperCompileFunction (isolate=<optimized out>, thread=<optimized out>, zone=<optimized out>, arguments=...) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:250
#39 dart::DRT_CompileFunction (arguments=...) at ../../third_party/dart/runtime/vm/compiler/jit/compiler.cc:246

here's the output of thread apply all bt full: https://gist.github.com/benwaffle/41944a53520d5f33475ced47c7adcac6

"Unable to parse platform message" when running on Linux

Terminal output displays this:

Unable to parse platform message
* Line 2, Column 1
  Syntax error: value, object or array expected.

Because of that, the example can't load or save files (Edit: the file chooser does appear but no files are saved or loaded, so working as intended)

Distribution details:

DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=17.1.10
DISTRIB_CODENAME=Hakoila
DISTRIB_DESCRIPTION="Manjaro Linux"
Linux Lenovo 4.16.14-2-MANJARO #1 SMP PREEMPT Fri Jun 8 20:10:17 UTC 2018 x86_64 GNU/Linux

To anyone else using this distro, I had to remove the unnecessary parentheses in the gtk3 header files so it compiled

macOS Makefile

any chance we could get a make file for MacOS, like Linux has ?

Oh and the linux one is quite complex make file structure. The macOS one can be much simpler

Will make it easier to keep up with things changing.

thanks...

Enable tooltip support

Tooltips are a common UI feature on desktop, so we should find a way to support it.

There are two very different approaches:

  1. Plumb mouse move events into Flutter (I think this is something that should be done regardless, as part of adding rich mouse support to the embedding API), and then figure out a way to make widgets intrinsically support tooltips.

  2. Write a plugin that vends rectangles and strings to the native layer, and implement the tooltips natively.

I think 1 is a much more promising route if it works out, because it's inevitable that people will want to do other hover effects as well, which option 1 lends itself to supporting. (And if someone really wants native tooltips rather than Flutter-drawn tooltips, generic hover support means they could write a plugin that displays a native tooltip as a hover action.)

Invalid kernel binary format with personal engine build

When building the flutter engine from source, I have this issue trying to run the stock example:

MIKE formatVersion=7, kBinaryFormatVersion=8
[ERROR:flutter/runtime/dart_isolate.cc(710)] Can't load Kernel binary: Invalid kernel binary format version.
Segmentation fault (core dumped)

where the first log is added by me to debug the issue.

flutter-desktop-embedding: 080305c
flutter: 5413560
engine: 098a137

I tried building the engine with the commit that update_flutter_engine pulls down, but no difference.

font-related segmentation fault

this code section:

new TextField(style: TextStyle(fontSize: 10.01),);

triggers a sigfault.
passing a POC through gdb i've found this message error:

Thread 2 "io.flutter.ui" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffXXXXXXXX (LWP 10286)]
minikin::FontCollection::baseFontFaked (this=0x0, style=...)
at ../../flutter/third_party/txt/src/minikin/FontCollection.cpp:506 ../../flutter/third_party/txt/src/minikin/FontCollection.cpp: No such file or directory.

MissingPluginException : the plugin works but an exception is throwed

Hi,
first : thanks for sharing this project ! it's really exciting :)
I started to play and tried to use plugins, but even if the call works, I get a MissingPluginException.

Future _colorPick() async {
  final channel = new MethodChannel('flutter/colorpanel', const JSONMethodCodec());
  final res = await channel.invokeMethod('ColorPanel.Show');
}

For instance when I use this method to open the colorPicker, the picker is opened, but I see an exception log.

[ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
MissingPluginException(No implementation found for method ColorPanel.Show on channel flutter/colorpanel)
#0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:153)
<asynchronous suspension>
#1      _MyHomePageState._colorPick (file:///Users/rxlabz/dev/labz/flutter/desktop/flutter_desktop2/example_flutter/lib/main.dart:81)
<asynchronous suspension>

Did I missed something ?

Resource Contexts Must be Provided For Async Texture Uploads.

In an upcoming engine change, the engine will log a warning if an embedder does not provide a resource context. Resource contexts are used for asynchronous texture uploads in Flutter and are highly recommended as they eliminate jank when attempting to decode and upload large images for rendering. The callback can be provided here and is similar to the make_current callback. The callback will be made on an internal thread separate from the GPU thread and the context used must be in the same sharegroup as the main context.

This is optional and the warning will only show up in un-optimized builds. But it is highly recommended.

Collaborating

This is great.

Whats the thoughts on Flutter plugins ? For example the Webview.

[macOS] keyevent not implemented

The keyDown/keyUp events which should be sent over the "flutter/keyevent" channel are not implemented in the macOS embedder. Because of that RawKeyboardListener does not work.

I got a working version in this branch: maun@b6bdb28

What would be necessary for a PR?

Windows Support

It seems like there should be an issue tracking all major operating systems. Windows support would also be awesome! :)

Running macos example: EXC_BAD_ACCESS (code=1, address=0xc3)

Steps to reproduce

  1. Open macos/example/Example Embedder.xcodeproj in Xcode
  2. Build and run

Expected result: the example app starts and runs

Actual result: Xcode stops execution on exception:

ui_thread (7): EXC_BAD_ACCESS (code=1, address=0xc3) 

I'm probably doing something wrong, but the docs are not super clear and I don't have a lot of experience with Xcode.

Flutter Doctor

flutter doctor -v
[✓] Flutter (Channel master, v0.2.5-pre.41, on Mac OS X 10.13.3 17D102, locale en-BY)
    • Flutter version 0.2.5-pre.41 at /Users/anatoly/flutter
    • Framework revision 2171fcb882 (4 days ago), 2018-03-25 00:04:24 -0700
    • Engine revision 6280adbfb1
    • Dart version 2.0.0-dev.39.0.flutter-06949dc985

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.3)
    • Android SDK at /Users/anatoly/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-26, build-tools 26.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.2, Build version 9C40b
    • ios-deploy 1.9.2
    • CocoaPods version 1.3.1

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Community Edition (version 2017.3.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 22.2.2
    • Dart plugin version 173.4548.30

[✓] VS Code (version 1.21.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.11.1

[!] Connected devices
    ! No devices available

Support rich mouse events

The embedding API needs a way to provide rich mouse events (right click, scroll wheel, mouse move, etc.). This is to track proposing that on the Flutter side, and then implementing it in the platform embedders if it's accepted.

If that's accepted, then it will be possible to start adding support for these things in Flutter widgets (e.g., scrolling lists using the scroll wheel).

Make the macOS example app self-contained

Currently it references all the Flutter code where it is in the source tree. It should bundle it all, so the example is of a working, self-contained application bundle.

Support tabbing between text fields

This is blocked on flutter/flutter#11344 for the underlying support for focus sequence.

Ideally this would be implemented entirely within Flutter by wiring the tab key into that system (external keyboards on mobile could potentially send tab events, I would assume), but if not we could bridge the missing functionality with a plugin.

How do I "link the resulting framework into your application"?

The directions at https://github.com/google/flutter-desktop-embedding/tree/master/macos don't make sense to me...

I've cloned 'flutter-desktop-embedding' next to 'flutter', and I've built "the Xcode project under library/". The part I'm stuck on is the "then link the resulting framework into your application" step... Not surprisingly, Dart's "import" command doesn't seem to work on frameworks. AFAIK, VS Code doesn't have anything analogous to .xcodeproj files, so there's no place to manually link it from the IDE and I can't find any settings in the dart files that look like they'd link anything.

Does anyone know what I'm doing wrong? When I open the Xcode project in /flutter-desktop-embedding/macos/example and click 'run', the window that pops up is blank, and the debug console gives me these errors:

[ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Dart_LoadScriptFromKernel: The binary program does not contain 'main'.
[ERROR:flutter/shell/platform/embedder/embedder_engine.cc(65)] Could not launch the engine with configuration.
flutter: Observatory listening on http://127.0.0.1:50803/

Thanks,

  • Dave Sweeris

Convert the macOS example app to use code instead of XIB

It's hard for someone to inspect a XIB and see what's going on. E.g., it's difficult to tell from the example app right now that double buffering has to be enabled for the view, whereas if we constructed the view and view controller in code it would be obvious, and could be easily commented.

There's a good chance this will involve some fixes to the framework, since the programatic creation of FLEView/FLEViewController hasn't really been used yet, and can almost certainly be made better. Notably -[FLEViewController view] will make a view that won't actually work, since that code path was added as a short-term solution for issues with headless mode.

[linux] Implement a view-based Linux embedder

The current Linux implementation is based on GLFW, and is mostly suited to just bringing up a single window containing nothing but the Flutter application. Ideally we want something more like the macOS implementation where Flutter could be a view within a native application.

Unlike macOS and Windows there's not a clear choice of toolkit to use, but GTK is one possible option.

[windows] flutter_location needs a .bat version

Currently tools/flutter_location is only a bash script, so Windows still requires that the Flutter tree be at a known location for the tooling to work. We need a .bat port, at which point update_flutter_engine.bat can use it the way update_flutter_engine uses flutter_location.

Improve desktop support

Here are some ideas to make Flutter better for desktop platforms:

  • Showing tooltips when the mouse pointer hovers over a widget with a tooltip (not sure if this is not implemented in this project or Flutter as a whole)
  • Clipboard integration
  • Select text from text fields with keyboard and use Ctrl+C and Ctrl+V
  • More keyboard integration, e.g. switching between widgets with the Tab key
  • Ability to scroll a ListView with mouse wheel

Dart dependency resolving fails

When running a Swift desktop project on mac with the FlutterEmbedderMac.framework I get this message:

Observatory server failed to start after 1 tries
error: Unable to read Dart source 'package:flutter/material.dart'.

The dart files and .packages file is located in the xcode project.

flutterViewController = FLEViewController()
flutterViewController?.launchEngine(
    withMainPath: Bundle.main.url(forResource: "main", withExtension:"dart")!,
    assetsPath: URL.init(fileURLWithPath: ".", isDirectory: true),
    packagesPath: Bundle.main.url(forResource: ".packages", withExtension: nil)!,
    asHeadless: false,
    commandLineArguments: [])

The .packages file defines the Flutter package as such:

# Generated by pub on 2018-02-25 11:22:00.767792.
...
csslib:file:///Users/jonathan/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.1/lib/
flutter:file:///Users/jonathan/flutter/packages/flutter/lib/
...

I've confirmed that the path and files exist.

[linux] Add native menu bar support

We'll need to define a protocol on the Dart side for populating and managing native menu bars, and receiving callbacks when they are selected, then implement corresponding plugins for each platform.

On macOS the native side should be relatively straightforward. Currently for Linux it will be tricky, since GLFW doesn't have menu bar support. If the GTK version is working by the time we get to this it'll be much more straightforward, otherwise we can look into a temporary solution like a floating menu window on Linux.

flutter-desktop do not display text in linux

in the latest flutter revision (v0.4.5-pre.41) the Text() widget seems not render.
i've tested the feature both with "example_flutter" and an app write on-purpose to test the widget and not work anyway.

Stop using internal system channel for text input handling

The current text input plugin is based on implementation details of the engine that are not public/stable API. Once there's a clearly defined text input API for embedders we need to switch to using that instead of the current unsupported approach.

[linux] Use prebuilt engine in build

There is now a cross-platform Dart update_flutter_engine script instead of the old macOS update_engine bash script, and it can do the same version-matched downloading of prebuilt libraries on Linux that the old script did on macOS. We should update the makefiles on Linux to use that script in the build (and update the Linux build instructions).

update_flutter_engine fails with a clean Flutter tree

A fresh Flutter tree checkout doesn't have the dart binary it in, since it's fetched on demand. The wrapper script will need to run some minimal flutter command to fetch it (I'm not sure yet what the best option is).

"Dart_GetClosure expects argument 'library' to be non-null" with latest Flutter engine

[ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] error: Unexpected tag 1 (Something) in ?, expected expression
[ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Dart_GetClosure expects argument 'library' to be non-null.

I am tring to run the linux version unmodified, but I can't get it showing anything it just stays gray and I get this error. Can it be from the engine? I followed their official guide for building the engine.

Oh sorry, I made this change and it worked.

  return CreateFlutterWindow(initial_width, initial_height, assets_path + "/../../lib/main.dart", assets_path, "",
  // return CreateFlutterWindow(initial_width, initial_height, assets_path + "", assets_path, "",

Support printing

Wondering if the team think printing should be a plug-in or incorporated ?

At the moment I use golang code to print stuff on desktops because it's easy to do cross platform.
On flutter mobile I use sharing.

Add a sample macOS app using the framework

Use of the framework is (at least currently) not very self-explanatory. We need a trivial sample app that shows packaging a Hello World-type Flutter application into a macOS application.

Flutter Desktop Webview Plugin

I need to open a different window that runs a webview. The use case is because i need to load some external third party stuff in that is just web based.

On desktops i use zserge which loads the native webview of the OS browser.
https://github.com/zserge/webview
Its great and easy.

So i am proposing a Flutter Desktop plugin for a Webview, just like the Flutter Mobile plugin here:
https://github.com/dart-flitter/flutter_webview_plugin

The API will be different for now of course.
Here is the golang wrapper over the cpp code.
For example here its obvious: https://github.com/zserge/webview/tree/master/examples/minimal-go

I see 2 options:

  1. i could make a shell call presumable from the Dart side to open the binary on the file system, but then the two windows no longer know about easy other.
  2. A better way would be to open a "flutter window" and have the webview load inside it.
    I think this maybe really easy due to zserge having a cpp base language to call.

If anyone has any other thoughts on this before i drill into this let me know.

[linux/windows] Add support for StandardMethodCodec

Currently the native plugin APIs are hard-coded to use JSON, so the Dart side must use JSONMethodCodec. We should support all the codec options that are supported on mobile, and a way to specify the codec to use for a given plugin.

Add a plugin to the macOS example

The example app should demonstrate registering a plugin with FLEViewController. A good candidate would be pulling the color picker out of the core set of plugins, making it optional, and using that as an example.

embedder crashes on linux with latest flutter

I did an update of flutter and rebuilt libflutter_engine.so with --runtime-mode=debug but running the app with the embedder is causing a segmentation fault.
5223 Segmentation fault (core dumped) ./app/app.bin
Is there any way to view a call stack or something to help with why this might be happening?

As usual all help appreciated.

Many thanks.

[linux] Text input plugin broken in master branch

Flutter version: bf531ba87119cb2292ec3bb4c88231c15e115a6b
Flutter engine version: 15ddcd448d972381cfa9c93c041dfa31a2061e0c

When building a binary that should run the examples/flutter_gallery app in the embedder, text input fails to function correctly. This should be investigated after #61 has landed to prevent spurious bugs/conflicts from merging.

Hot reload support?

Hi, I'm interested in adding support for hot reload and debugging, but I don't know enough about flutter/dart ecosystem. Would implementing flutter/flutter#5043 solve the problem or is it more complicated?

Something like flutter connect http://127.0.0.1:49278/ to completely bypass device detection, etc.

Add file-picker plugin support to Linux

We have a macOS implementation of the native side of the file picker plugin; we need a Linux version as well. Implementation will depend on the toolkit we end up using for the base Linux embedder.

[macOS] Support VoiceOver

Currently VoiceOver has no visibility into the Flutter surface. Since it works on iOS presumably macOS could also be wired up, but it may require exposing something via the embedding API (or it may be entirely within Flutter, in which case this just tracks the need to ensure that work is done on the Flutter side).

[linux] Make the example app build a standalone directory

Per the TODO in the linux Makefile, we should make that example bundle all the flutter resources and shared libraries into a single directory structure (updating the load paths as necessary) so that the result is relatively self-contained and movable, rather than requiring that it be run from a specific directory with references throughout the tree.

throttle FlutterWindowLoop in linux implementation

in the linux implementation the FlutterWindowLoop() due to the unregulated while infinite loop takes an high cpu percentange.
i think that flutter engine has some sort of flag to comunicate when a new frame is created so i think we can implement a event-based loop.

Failed to load emoji font

Error message:
---- failed to open </usr/share/fonts/noto/NotoColorEmoji.ttf> <0> as a font

As a result, emojis look like boxes

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.