flutter-elinux:基于 Flutter SDK 的嵌入式 Linux 应用开发项目

Flutter tools for embedded Linux (eLinux)

Branch1Tags0
FilesLast commitLast update
2 years ago
8 months ago
4 years ago
1 year ago
1 year ago
3 years ago
5 years ago
1 year ago
5 years ago
5 years ago
3 years ago
5 years ago
2 years ago

Flutter for Embedded Linux (eLinux)

flutter-elinux

Analysis

本软件是 Flutter SDK非官方扩展,用于借助 flutter-embedded-linux(Flutter 的嵌入式 Linux 嵌入器)为嵌入式 Linux 设备构建和调试 Flutter 应用。

代码仓库

贡献

欢迎参与本项目。我们欢迎您的所有贡献和反馈。详见:CONTRIBUTING.md

功能特性

  • 针对嵌入式系统优化的 Flutter
    • 比 Linux 桌面版 Flutter 更轻量(不使用 X11 和 GTK)
    • 支持 arm64/x64 设备
    • 依赖库极少
  • 嵌入式软件开发
    • 支持从 x64 交叉构建到 arm64
    • 可向远程目标设备安装/卸载应用及进行调试
  • 支持 Flutter 插件
  • 显示后端
  • 支持键盘、鼠标和触摸输入
  • 与 Flutter 桌面版同等质量
  • 与 Windows 桌面版 Flutter 和 GLFW 的 API 兼容性
    • 诸如 MethodChannel 和 EventChannel 等 API 与其完全相同

如需了解更多详情,另请参见 flutter-embedded-linux

插件

可在 flutter-elinux-plugins 找到适用于 eLinux 的 Flutter 插件,例如 video_player 和 camera。

用户文档

包含快速入门指南在内的用户文档可在 Wiki 中找到。

快速入门

安装 flutter-elinux

$ git clone https://github.com/sony/flutter-elinux.git
$ sudo mv flutter-elinux /opt/
$ export PATH=$PATH:/opt/flutter-elinux/bin

安装所需工具

$ sudo apt install unzip curl clang cmake pkg-config

在 Wayland 合成器上运行 Flutter 示例应用

您需要安装 Wayland 合成器,例如 SwayWeston,并在启动 Flutter 应用之前启动该合成器。Weston 9 版本存在一些已知问题。因此,我们建议使用其他合成器,例如 Sway。

$ sudo apt install sway
$ sway &
$ flutter-elinux devices
2 connected devices:

eLinux (desktop) • elinux-wayland • flutter-tester • Ubuntu 20.04.2 LTS 5.8.0-63-generic
eLinux (desktop) • elinux-x11     • flutter-tester • Ubuntu 20.04.2 LTS 5.8.0-63-generic
$ flutter-elinux create sample
$ cd sample
$ flutter-elinux run -d elinux-wayland

如果您想在 X11 中运行 Flutter 应用,请使用 elinux-x11 而非 elinux-wayland

$ flutter-elinux run -d elinux-x11

从 flutter-tizen 分叉而来

本软件是通过从 flutter-tizen 分叉创建的(分叉自 此版本)。特别感谢 flutter-tizen 团队。

Introduction

Flutter tools for embedded Linux (eLinux)

Customize your domain