子标题:Ubuntu团队为所有Linux发行版上的Flutter应用程序制作了一个新的基于GTK +的主机。 此文翻译自:https://medium.com/flutter/announcing-f
为什么要在Linux上使用Flutter?
- 快速发展的应用程序开发人员生态系统
- 多平台支持
- 高度优化的本机应用程序
- 现代的UI框架,支持声明式,反应式和可组合的小部件
- 使用Visual Studio Code,Android Studio和IntelliJ的丰富开发平台
Flokk:证明Flutter已为台式机做好准备
在Linux上轻松安装Flutter
$ snap install --classic flutter
$ snap install --classic code
$ code --install-extension dart-code.flutter
适用于Linux桌面的Flutter
$ flutter channel dev
$ flutter upgrade
$ flutter config --enable-linux-desktop
$ flutter create counter
$ cd counter
$ flutter run -d linux
$ cd my_flutter_app
$ flutter create .
从Flutter访问Linux中的本机代码
部署到 Snap Store
$ sudo snap install snapcraft --classic
name: flokk-contacts
version: 1.0.1
summary: Flokk Contacts
description: A fresh and modern Google Contacts manager that integrates with GitHub and Twitter.
confinement: strict
base: core18
grade: stable
apps:
flokk-contacts:
command: flokk-contacts
extensions: [flutter-master]
plugs:
- network
parts:
flokk-contacts:
source: .
plugin: flutter
flutter-target: lib/main.dart # app's main entry-point file
$ snapcraft
$ snapcraft login
$ snapcraft register flokk-contacts
$ snapcraft upload flokk-contacts_1.0.1_amd64.snap --release edge
$ snap install --edge flokk-contacts
Flutter Linux桌面案例
摘要