flutterpi_tools_mac

A Flutter 3.44 compatible fork of flutterpi_tool, a tool to make developing and distributing Flutter apps for https://github.com/ardera/flutter-pi easier.

This fork keeps the original MIT license and updates the package/executable name to flutterpi_tools_mac.

📰 News

  • Building & Running apps on meta-flutter yocto distros works now, via the --fs-layout=meta-flutter option to flutterpi_tools_mac devices add, flutterpi_tools_mac 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

Add the tool to a Flutter project:

flutter pub add dev:flutterpi_tools_mac

Then run it from that project:

flutter pub run flutterpi_tools_mac --help

flutterpi_tools_mac is deeply integrated with Flutter internals and depends on flutter_tools, so compatibility is tied to Flutter SDK versions. Prebuilt flutter-pi engine artifacts are also tied to exact Flutter engine hashes. If your Flutter SDK is newer than the latest available flutter-pi artifact release, use the newest Flutter SDK listed in the ardera/flutter-ci releases.

Usage

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

Usage: flutterpi_tools_mac <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_tools_mac'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_tools_mac devices.

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

Examples

1. Adding a device

$ flutterpi_tools_mac 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_tools_mac 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_tools_mac devices add root@my-yocto-device --fs-layout=meta-flutter

4. Listing devices

$ flutterpi_tools_mac 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_tools_mac 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_tools_mac 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_tools_mac run -d pi5 --profile