Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计提醒

flutter-setting-up-on-linuxFlutter setting UP ON linux 命令行

Agent Skill

flutter-setting-up-on-linux 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

187,872

周安装

7,588

GitHub Stars

1,324

下载量

58,976
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:flutter-setting-up-on-linux(Flutter setting UP ON linux 命令行)
来源仓库:https://github.com/flutter/skills
仓库路径:skills/flutter-setting-up-on-linux
安装命令:
npx skills add https://github.com/flutter/skills --skill flutter-setting-up-on-linux
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/flutter/skills --skill flutter-setting-up-on-linux

简介

通过依赖项安装和验证工作流程,自动化 Flutter 桌面开发的 Linux 环境设置。

  • 涵盖三个核心工作流程:安装系统依赖项(构建工具、GTK库、C/C++工具链)、使用flutter doctor验证环境,并准备 Snap 包进行分发
  • 为 Debian/Ubuntu 系统提供可立即运行的命令,并包括 ChromeOS Linux 容器的条件设置
  • 包括基线 snapcraft.yaml
  • 用于通过适当的限制和 D-Bus 配置为 Snap Store 打包 Flutter Linux 应用程序的模板

SKILL.md

Setting Up a Linux Environment for Flutter Development

Contents

System Dependencies

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:

  • Core Utilities: curl, git, unzip, xz-utils, zip
  • Build Tools: clang, cmake, ninja-build, pkg-config
  • Libraries: libglu1-mesa, libgtk-3-dev, libstdc++-12-dev

Workflow: Configuring the Linux Toolchain

Follow this sequential workflow to prepare the Linux host for Flutter desktop development.

Task Progress:

  • 1. Update package lists and upgrade existing packages.
  • 2. Install core utilities and build dependencies.
  • 3. Configure IDE/Editor with Flutter support.
  • 4. (Conditional) Enable Linux support on ChromeOS.

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

  • If developing on a Chromebook: Turn on Linux support in the ChromeOS settings. Ensure the Linux container is fully updated using the 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.

Workflow: Validating the Environment

Run this feedback loop to ensure the toolchain is correctly recognized by the Flutter SDK.

Task Progress:

  • 1. Run environment validator.
  • 2. Verify connected Linux devices.
  • 3. Resolve toolchain errors.

1. Run Validator Execute the Flutter diagnostic tool with verbose output:

flutter doctor -v

2. Review and Fix (Feedback Loop)

  • If errors exist under the "Linux toolchain" section: Review the missing dependencies, install the flagged packages, and re-run 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.

Workflow: Preparing for Distribution (Snapcraft)

When preparing a release build for the Snap Store, configure the Snapcraft build environment.

Task Progress:

  • 1. Install Snapcraft and LXD.
  • 2. Configure LXD.
  • 3. Build the Snap package.

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

Examples

Baseline snapcraft.yaml Configuration

Use 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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.47%
按下载量换算19,739

Claude

31.39%
按下载量换算18,513

Cursor

18.63%
按下载量换算10,987

Gemini CLI

9.1%
按下载量换算5,367

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills