搜索插件、代码仓与 APP 分类

插件详情v0.12.0

flutterpi_tool

一个用于简化 flutter-pi 应用开发与分发的工具。

AndroidiOSmacOSWindowsLinux
近 30 天下载
3210
喜欢数
44
Pub 分数
40

安装插件

flutter pub add flutterpi_tool

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

flutterpi_tool 是一个用于简化使用 flutter-pi 在嵌入式和桌面平台上创建、测试和部署 Flutter 应用程序的开发和分发工具。它通过自动化跨多个操作系统的设置、构建和打包流程,提升了工作效率,支持 Linux、Windows、macOS、Android 和 iOS 等系统。该工具通过自动执行与跨平台应用交付相关的重复性任务,显著提升工作流效率,特别适用于无头或低资源环境。它可通过简单的 pub add 命令与现有 Flutter 项目无缝集成。

适合场景

  • 跨平台 Flutter 应用部署
  • 简化版 flutter-pi 项目设置
  • 嵌入式设备的自动化构建
  • 精简的无头应用程序分发
  • 在 Linux 和其他目标上测试 Flutter 应用

主要特点

  • 通过 pub 的单命令安装
  • 多平台支持(Linux、Windows、macOS、Android、iOS)
  • 自动化构建和打包工作流
  • 与 flutter-pi 生态系统的集成
  • 支持无头和嵌入式部署

适合对象

  • 面向嵌入式系统的开发人员
  • 在 Linux 上部署 Flutter 应用的团队
  • 使用 flutter-pi 的跨平台应用程序创建者
  • 物联网和自助服务终端应用开发者
  • 适用于基于 Flutter 的桌面应用程序的 DevOps 工作流

使用建议

  • 需要 flutter-pi 环境设置
  • 仅限用于 flutter-pi 项目
  • 可能需要为复杂构建进行额外配置
  • 不适用于移动应用商店发布
  • 依赖于托管在 GitHub 上的源代码

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

flutterpi_tool

A tool to make developing & distributing flutter apps for https://github.com/ardera/flutter-pi easier.

📰 News

  • Building & Running apps on meta-flutter yocto distros works now, via the --fs-layout=meta-flutter option to flutterpi_tool devices add, flutterpi_tool build.
  • RISC-V 64-bit is now supported as a target & host platform.
  • The flutter-pi binary to bundle can now be explicitly specified using --flutterpi-binary=...

Setup

Setting up is as simple as:

flutter pub global activate flutterpi_tool

flutterpi_tool is pretty deeply integrated with the official flutter tool, so it's very well possible you encounter errors during this step when using incompatible versions.

If that happens, and flutter pub global activate exits with an error, make sure you're on the latest stable flutter SDK. If you're on an older flutter SDK, you might want to add an explicit dependency constraint to use an older version of flutterpi_tool. E.g. for flutter 3.19 you would use flutterpi_tool 0.3.x:

flutter pub global activate flutterpi_tool ^0.3.0

If you are already using the latest stable flutter SDK, and the command still doesn't work, please open an issue!

Usage

$ flutterpi_tool --help
A tool to make development & distribution of flutter-pi apps easier.

Usage: flutterpi_tool <command> [arguments]

Global options:
-h, --help         Print this usage information.
-d, --device-id    Target device id or name (prefixes allowed).

Other options
    --verbose      Enable verbose logging.

Available commands:

Flutter-Pi Tool
  precache   Populate the flutterpi_tool's cache of binary artifacts.

Project
  build      Builds a flutter-pi asset bundle.
  run        Run your Flutter app on an attached device.

Tools & Devices
  devices    List & manage flutterpi_tool devices.

Run "flutterpi_tool help <command>" for more information about a command.

Examples

1. Adding a device
$ flutterpi_tool devices add pi@pi5
Device "pi5" has been added successfully.
2. Adding a device with an explicit display size of 285x190mm, and a custom device name
$ flutterpi_tool devices add pi@pi5 --display-size=285x190 --id=my-pi
Device "my-pi" has been added successfully.
3. Adding a device that uses meta-flutter
$ flutterpi_tool devices add root@my-yocto-device --fs-layout=meta-flutter
4. Listing devices
$ flutterpi_tool devices
Found 1 wirelessly connected device:
  pi5 (mobile) • pi5 • linux-arm64 • Linux

If you expected another device to be detected, try increasing the time to wait
for connected devices by using the "flutterpi_tool devices list" command with
the "--device-timeout" flag.
...
5. Creating and running an app on a remote device
$ flutter create hello_world && cd hello_world

$ flutterpi_tool run -d pi5
Launching lib/main.dart on pi5 in debug mode...
Building Flutter-Pi bundle...
Installing app on device...
...
6. Running the same app in profile mode
$ flutterpi_tool run -d pi5 --profile

所属分类

依赖

依赖清单 11 项

源码仓库

使用此插件的项目

暂无相关数据。