Experimental plugins for Flutter for Desktop

Overview

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.

testbed is a a simple test application for the plugins above.

Caveats

  • This is not an officially supported Google product.
Comments
  • Add plugin for system tray icons

    Add plugin for system tray icons

    This is related to the menu plugin.

    Needed not so obvious functionality:

    • [ ] Position of the icon
    • [ ] Setting icon as monochromatic template image is needed on macOS so it can support dark mode
    • [ ] Allow text instead of the icon or in addition to the icon. I don't know if this is possible on Linux or Windows but macOS allows this.

    @stuartmorgan should I create this issue in the flutter repo or is this the best place for it?

    opened by cbenhagen 29
  • [Linux] Failed to setup Skia Gr context.

    [Linux] Failed to setup Skia Gr context.

    Following the instructions in the README for the example application briefly opens the application, but then yields the following error:

    ./example/out/flutter_embedder_example 
    flutter: Observatory listening on http://127.0.0.1:42549/
    [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(73)] Failed to setup Skia Gr context.
    Segmentation fault (core dumped)
    
    

    Ubuntu 18.04

    opened by coljamkop 21
  • [Linux] Failed to setup Skia Gr context in some configurations

    [Linux] Failed to setup Skia Gr context in some configurations

    With recent builds, some people are seeing persistent "Failed to setup Skia Gr context" logging + crash on startup.

    Unlike the previous instance (#135), this does not affect all Linux configurations, only some, which suggests this may be driver related, or capability-related. For instance, in at least one instance I'm aware of the crash happens when using a machine normally, but not when using Chrome Remote Desktop to access the same machine.

    Things that could be useful from people experiencing this:

    1. Information about your machine configuration
    2. Testing with older versions of Flutter to try to find a regression range (since this seems to have started recently for people, I expect this was triggered by a change in the Flutter engine).
    3. Building a local Flutter engine and debugging the failure

    (3) would be the most useful, but is obviously the most involved. I believe @franciscojma86 will be trying this route.

    opened by stuartmorgan 19
  • Build errors with Visual Studio 2012

    Build errors with Visual Studio 2012

    Log ---------------------------------------flutter run --verbose-------------------------------------

    C:\src\flutter-desktop-embedding\example>flutter run --verbose
    [  +22 ms] executing: [C:\src\flutter\] git log -n 1 --pretty=format:%H
    [  +65 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
    [        ] e6dc6a8b5f26cb2092257da07fc1d1818e4b4cce
    [        ] executing: [C:\src\flutter\] git describe --match v*.*.* --first-parent --long --tags
    [  +54 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
    [        ] v1.8.3-52-ge6dc6a8b5
    [   +8 ms] executing: [C:\src\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
    [  +46 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [   +1 ms] origin/master
    [        ] executing: [C:\src\flutter\] git ls-remote --get-url origin
    [  +40 ms] Exit code 0 from: git ls-remote --get-url origin
    [   +1 ms] https://github.com/flutter/flutter.git
    [  +77 ms] executing: [C:\src\flutter\] git rev-parse --abbrev-ref HEAD
    [  +39 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [   +1 ms] master
    [ +113 ms] executing: C:\Users\Orion\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +27 ms] Exit code 0 from: C:\Users\Orion\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [        ] List of devices attached
    [  +23 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [   +6 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [ +123 ms] Launching lib\main.dart on Windows in debug mode...
    [  +82 ms] Building Windows application...
    [ +121 ms] \nodejs\node_global";C:\src\flutter\bin;;C:\src\flutter\bin\mingit\cmd" was unexpected at this time.
    [  +15 ms] Building Windows application... (completed in 0.1s)
    [   +3 ms] "flutter run" took 571ms.
    Build process failed
    
    #0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
    #1      buildWindows (package:flutter_tools/src/windows/build_windows.dart:84:5)
    <asynchronous suspension>
    #2      WindowsDevice.startApp (package:flutter_tools/src/windows/windows_device.dart:85:13)
    <asynchronous suspension>
    #3      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:379:54)
    <asynchronous suspension>
    #4      HotRunner.run (package:flutter_tools/src/run_hot.dart:247:39)
    <asynchronous suspension>
    #5      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:473:37)
    <asynchronous suspension>
    #6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
    #7      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
    #8      _rootRunUnary (dart:async/zone.dart:1132:38)
    #9      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
    #10     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
    #11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
    #12     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
    #13     Future._complete (dart:async/future_impl.dart:473:7)
    #14     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
    #15     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)
    #16     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
    #17     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
    #18     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
    #19     _rootRunUnary (dart:async/zone.dart:1132:38)
    #20     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
    #21     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
    #22     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
    #23     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
    #24     Future._complete (dart:async/future_impl.dart:473:7)
    #25     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
    #26     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
    #27     _rootRun (dart:async/zone.dart:1120:38)
    #28     _CustomZone.run (dart:async/zone.dart:1021:19)
    #29     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
    #30     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
    #31     _rootRun (dart:async/zone.dart:1124:13)
    #32     _CustomZone.run (dart:async/zone.dart:1021:19)
    #33     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
    #34     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
    #35     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
    #36     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
    #37     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
    #38     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
    

    -----------------------------------------------------flutter doctor -v----------------------------

    C:\src\flutter-desktop-embedding\example>flutter doctor -v
    [√] Flutter (Channel master, v1.8.4-pre.52, on Microsoft Windows [Version 10.0.17134.885], locale zh-CN)
        • Flutter version 1.8.4-pre.52 at C:\src\flutter
        • Framework revision e6dc6a8b5f (3 hours ago), 2019-08-01 10:29:06 +0200
        • Engine revision b41c172bcd
        • Dart version 2.5.0 (build 2.5.0-dev.1.0 bd049f5b53)
    
    
    [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        • Android SDK at C:\Users\Orion\AppData\Local\Android\Sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-28, build-tools 28.0.3
        • ANDROID_HOME = C:\Users\Orion\AppData\Local\Android\Sdk
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
        • All Android licenses accepted.
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.2.0)
        • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
        • Visual Studio Community 2019 version 16.2.29123.88
    
    [√] Android Studio (version 3.4)
        • Android Studio at C:\Program Files\Android\Android Studio
        • Flutter plugin version 37.1.1
        • Dart plugin version 183.6270
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    
    [√] VS Code (version 1.36.1)
        • VS Code at C:\Users\Orion\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.2.0
    
    [√] Connected device (1 available)
        • Windows • Windows • windows-x64 • Microsoft Windows [Version 10.0.17134.885]
    
    • No issues found!
    

    opened by Tumbler0809 18
  • Update windows projects for compatibility with VS 2019 (and new VS 2017 installs)

    Update windows projects for compatibility with VS 2019 (and new VS 2017 installs)

    Per https://github.com/google/flutter-desktop-embedding/issues/338#issuecomment-485255745 VS 2019 complains about the SDK and toolchain versions. We need to determine whether there are any compilation issues after doing the project upgrades.

    @clarkezone I'm not familiar with how VS versioning is handled. Is it expected that someone using a newer version would always need to do manual project upgrades, or is there a way to configure the project to allow using x-or-newer component versions rather than exactly-x?

    opened by stuartmorgan 18
  • Support Texture widget

    Support Texture widget

    We have ported the WebRTC plugin for iOS/Android, but there is no Texture widget in flutter-desktop-embedding, Texture is needed to support video rendering and video player development.

    opened by cloudwebrtc 17
  • Make the project compile under Ubuntu 16.04 or lower

    Make the project compile under Ubuntu 16.04 or lower

    When the project compiling under Ubuntu 16.04, it prompts that some symbol definitions are missing, because Ubuntu 16.04 can only install the older version of libglfw3-dev(v3.1) and libgtk-3-dev(v3.18) via apt-get. Make the project can be compiled by the following modifications:

    1. Add the GLFW_TRUE macro when it's undefined.
    2. Replace GtkFileChooserNative with GtkFileChooserDialog to support lower GTK versions.
    opened by badpx 16
  • Running macos example: EXC_BAD_ACCESS (code=1, address=0xc3)

    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
    
    opened by pulyaevskiy 16
  • [flutter/plugins] Support shared_preferences

    [flutter/plugins] Support shared_preferences

    This is simple for macOS since it can use NSUserDefaults as on iOS. Investigation is needed to figure out what the best equivalents would be for Linux and Windows.

    os-linux os-windows 
    opened by stuartmorgan 15
  • [windows] Add plugin support

    [windows] Add plugin support

    The current implementation has no plugin support. I expect that we'll be able to share most or all of the Linux code for the plugin infrastructure (although if Windows provides a built-in JSON parser, we'll presumably want to use that instead of jsoncpp).

    If we can't use the same code, then the Windows version should not follow the macOS/Linux example, since I plan to rewrite both per #102. Instead it should be written directly to the end-state of the macOS/Linux refactoring (which would mean something very much like the Flutter Android implementation).

    opened by stuartmorgan 15
  • embedder crashes on linux with latest flutter

    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.

    opened by billy1380 15
  • [window_size] setWindowMinSize and setWindowMaxSize not setting correct window size on Linux

    [window_size] setWindowMinSize and setWindowMaxSize not setting correct window size on Linux

    When making a flutter app for Linux, the initial size can be set by altering the parameters of gtk_window_set_default_size() in my_application.cc: gtk_window_set_default_size(window, 450, 750);

    Then trying to set maximum and minimum sizes using the window_size plugin in dart code using the same dimensions:

    final fixedSize = Size(450, 750);
    setWindowMinSize(fixedSize);
    setWindowMaxSize(fixedSize);
    

    However when setting this maximum and minimum the window is resized to below the size set initially in the native code using GTK, despite using the same dimensions. Wouldn't the expected behaviour be for the app not to change size at all?

    opened by Letal1s 2
  • [menubar] Plugin does not print Errors

    [menubar] Plugin does not print Errors

    Hi there,

    The menubar plugin handles Exceptions by printing them, but subclasses of Errors slip through the cracks and go unprinted. This is a result of this catch.

    Perhaps a fallback catch is warranted, with a print and a rethrow?

    bug 
    opened by shyndman 1
  • [menubar] Support keyboard shortcuts

    [menubar] Support keyboard shortcuts

    The current menu support doesn't allow for keyboard shortcuts, which is definitely necessary.

    (It might also be useful to have some kind of generic way for widgets to handle keyboard shortcuts, but that would need more thought about how focus works in a desktop Flutter environment.)

    os-linux os-windows 
    opened by stuartmorgan 13
Owner
Google
Google ❤️ Open Source
Google
Experimental embedder for Flutter

NativeShell (Experimental embedder for Flutter) Features Leverages existing Flutter desktop embedder on each platform Unlike Flutter desktop embedders

NativeShell 551 Dec 28, 2022
Dart web - Experimental web framework for Dart. Supports SPA and SSR

dart_web Experimental web framework for Dart. Supports SPA and SSR. Relies on pa

Kilian Schulte 307 Dec 23, 2022
Experimental web framework for Dart. Supports SPAs and SSR.

jaspr Experimental web framework for Dart. Supports SPAs and SSR. Main Features: Familiar component model similar to Flutter widgets Easy Server Side

Kilian Schulte 310 Jan 4, 2023
Flutter Community Plus Plugins

Flutter Community Plus Plugins Plus plugins PlusPlugins is a set of Flutter plugins that is developed based on existing Flutter plugins with extra fun

Flutter Community 1.1k Jan 5, 2023
Flutter plugins used in Mixin

flutter-plugins This repo contains the source code for Flutter plugins which used in Mixin. Check the packages directory for all plugins. Plugins Plug

Mixin Network 246 Jan 3, 2023
A Flutter package that makes it easy to customize and work with your Flutter desktop app window.

bitsdojo_window A Flutter package that makes it easy to customize and work with your Flutter desktop app window on Windows, macOS and Linux. Watch the

Bits Dojo 607 Jan 4, 2023
Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size.

desktop_window Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size. Usage import 'package:desktop_window/desktop_window.dart

ChunKoo Park 72 Dec 2, 2022
A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.

system_tray A Flutter package that that enables support for system tray menu for desktop flutter apps. on Windows, macOS and Linux. Features: - Modify

AnTler 140 Dec 30, 2022
File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.

A package that allows you to use the native file explorer to pick single or multiple files, with extensions filtering support.

Miguel Ruivo 987 Jan 6, 2023
This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

hotkey_manager This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut). hotkey_manager Platform Support Quick Star

LeanFlutter 81 Dec 21, 2022
This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc.

screen_retriever This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc. screen_retriever P

LeanFlutter 27 Dec 6, 2022
This plugin allows Flutter desktop apps to extract text from screen.

screen_text_extractor This plugin allows Flutter desktop apps to extract text from screen. screen_text_extractor Platform Support Quick Start Installa

LeanFlutter 30 Dec 21, 2022
This plugin allows Flutter desktop apps to defines system tray.

tray_manager This plugin allows Flutter desktop apps to defines system tray. tray_manager Platform Support Quick Start Installation ⚠️ Linux requireme

LeanFlutter 122 Dec 22, 2022
This plugin allows Flutter desktop apps to resizing and repositioning the window.

window_manager This plugin allows Flutter desktop apps to resizing and repositioning the window. window_manager Platform Support Quick Start Installat

LeanFlutter 351 Jan 7, 2023
A platform adaptive Flutter app for desktop, mobile and web.

Flutter Folio A demo app showcasing how Flutter can deliver a great multi-platform experience, targeting iOS, Android, MacOS, Windows, Linux, and web.

gskinner team 3.5k Jan 2, 2023
Pangolin Desktop UI shell, designed for dahliaOS, written in Flutter.

Website ● Discord ● Releases ● Donate ● Documentation Pangolin Desktop UI Pangolin UI is a Desktop shell for dahliaOS, written in Flutter, runs on Lin

dahliaOS 1.7k Jan 3, 2023
Unofficial Ubuntu Desktop Settings App made with Flutter

Unofficial Ubuntu Desktop Settings App made with Flutter - WIP The goal of this project is to build a feature complete settings app for the Ubuntu des

Frederik Feichtmeier 239 Jan 1, 2023
Simple file explorer for desktop made with Flutter, highly inspired by macOS Finder

file_explorer A basic file explorer made with Flutter Getting Started This project is a starting point for a Flutter application. A few resources to g

Valentin 0 Nov 7, 2021
An 🎵 audio playback library for Flutter Desktop. Supports Windows & Linux. Based on miniaudio.

✒ libwinmedia is sequel to this project. It provides network playback, better format support, control & features. An audio playback library for Flutte

Hitesh Kumar Saini 50 Oct 31, 2022