一键导入
super-cool-app
Sets up a Linux environment for Flutter development. Use when configuring a Linux machine to run, build, or deploy Flutter applications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Sets up a Linux environment for Flutter development. Use when configuring a Linux machine to run, build, or deploy Flutter applications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert guidance for `build_runner 2.13.x` in this repository. Covers adopting code generation safely in a project that currently has no `build_runner`, no `build.yaml`, and no checked-in generated files. Use when adding builders such as `json_serializable`, `freezed`, `mockito`, `go_router_builder`, or similar; configuring `build.yaml`; running `build` or `watch`; handling generated outputs; or debugging codegen issues without breaking this project's architecture.
Expert guidance for `flutter_bloc 9.1.x`, `bloc 9.x`, and `bloc_test 10.x` in this repository. Covers Cubit vs Bloc, BlocProvider and RepositoryProvider, BlocBuilder, BlocListener, BlocConsumer, BlocSelector, BlocObserver, and testing with bloc_test. Use when adopting flutter_bloc, introducing bloc-based presentation state, testing blocs/cubits, or deciding how bloc fits this project's existing get_it plus view-model architecture.
Builds Flutter plugins that provide native interop for other apps to use. Use when creating reusable packages that bridge Flutter with platform-specific functionality.
Sets up a macOS environment for Flutter development. Use when configuring a macOS machine to run, build, or deploy Flutter applications for iOS or macOS.
Sets up a Windows environment for Flutter development. Use when configuring a Windows machine to run, build, or deploy Flutter applications for Windows desktop or Android.
Implements unit, widget, and integration tests for a Flutter app. Use when ensuring code quality and preventing regressions through automated testing.
| name | flutter-setting-up-on-linux |
| description | Sets up a Linux environment for Flutter development. Use when configuring a Linux machine to run, build, or deploy Flutter applications. |
| metadata | {"model":"models/gemini-3.1-pro-preview","last_modified":"Thu, 12 Mar 2026 22:12:22 GMT"} |
To build and run Flutter applications on a Linux desktop, install the required C/C++ toolchain and system libraries. Flutter relies on dart:ffi to interface with Linux system calls and the GTK framework for UI rendering.
Required packages for Debian/Ubuntu-based distributions:
curl, git, unzip, xz-utils, zipclang, cmake, ninja-build, pkg-configlibglu1-mesa, libgtk-3-dev, libstdc++-12-devFollow this sequential workflow to prepare the Linux host for Flutter desktop development.
Task Progress:
1. Update and Install Dependencies Execute the following command to install all required packages on Debian/Ubuntu systems:
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev
2. Conditional: ChromeOS Setup
apt-get commands above before proceeding.3. IDE Configuration Install Visual Studio Code, Android Studio, or an IntelliJ-based IDE. Install the official Dart and Flutter extensions/plugins to enable language server features and debugging capabilities.
Run this feedback loop to ensure the toolchain is correctly recognized by the Flutter SDK.
Task Progress:
1. Run Validator Execute the Flutter diagnostic tool with verbose output:
flutter doctor -v
2. Review and Fix (Feedback Loop)
flutter doctor -v. Repeat until the Linux toolchain section passes.3. Verify Device Availability Ensure the Linux desktop is recognized as a valid deployment target:
flutter devices
Expected Output: At least one entry must display with the platform marked as linux.
When preparing a release build for the Snap Store, configure the Snapcraft build environment.
Task Progress:
1. Install Build Tools
sudo snap install snapcraft --classic
sudo snap install lxd
2. Configure LXD
Initialize LXD and add the current user to the lxd group:
sudo lxd init
sudo usermod -a -G lxd <your_username>
Note: Log out and log back in to apply the group changes.
3. Build the Snap
Navigate to the project root containing the snap/snapcraft.yaml file and execute the build:
snapcraft --use-lxd
snapcraft.yaml ConfigurationUse this template for the <project_root>/snap/snapcraft.yaml file when packaging a Flutter Linux app for the Snap Store.
name: super-cool-app
version: 0.1.0
summary: Super Cool App
description: Super Cool App that does everything!
confinement: strict
base: core22
grade: stable
slots:
dbus-super-cool-app:
interface: dbus
bus: session
name: org.bar.super_cool_app
apps:
super-cool-app:
command: super_cool_app
extensions: [gnome]
plugs:
- network
slots:
- dbus-super-cool-app
parts:
super-cool-app:
source: .
plugin: flutter
flutter-target: lib/main.dart