# bump-dart

Adopt this skill: https://proskills.md/skills/other/flutter-flutter-agents-skills-bump-dart

Page: https://proskills.md/skills/other/flutter-flutter-agents-skills-bump-dart
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: .agents/skills/bump-dart/SKILL.md
size: 4639
sha: 94a7bf6bb411555875c636c71d1e5800296df8e7
upstream: https://github.com/flutter/flutter/blob/master/.agents/skills/bump-dart/SKILL.md

````text
---
name: bump-dart
description: Do not trigger automatically; only run when a user runs /bump-dart. Bump the minimum Dart SDK version constraint across the flutter/flutter repository, update dependency checksums, and run verification.
---

# Bumping the Dart SDK Version Constraint

## Important Rules

1. **Never Update Dependencies to 'any':** The skill must **never** change or update any dependency version constraint to `any` in order to resolve version conflicts.
2. **Pause and Ask on Issues:** If you run into any issues executing the task (e.g., version resolution failures, checksum mismatches, test failures, or analyzer errors), **do not** attempt to fix them by modifying other dependencies. Pause immediately, report the exact error details, and ask the user for instructions.
3. **Handle Language Feature Version Discrepancies:** If static analysis fails because a package uses language features from a newer SDK version than the requested target (e.g., `private-named-parameters` in `widget_preview_scaffold` requiring `3.12.0`), ask the user if that specific package should be targeted at the higher SDK version while the rest of the repository remains at the requested target.

## Step-by-Step Workflow

Follow these steps carefully to perform the bump, resolve dependencies, and verify the changes.

### Step 1: Pre-flight Checks
1. **Verify target version suffix:**
   Ensure the version constraint specified by the user includes the `-0` pre-release suffix (e.g., `^3.13.0-0` instead of `^3.13.0`).
   * **Why:** Standard caret constraints like `^3.13.0` exclude pre-release versions of that major/minor release. Since active development and CI run on pre-releases, omitting the `-0` suffix will cause package resolution to fail. If the user provided a version without `-0`, append it or ask the user for confirmation.
2. **Ensure SDK is already rolled:**
   The target Dart SDK version must already have rolled into the repository (e.g. the local Dart SDK from the Engine stamp is at least that version). Otherwise, package resolution and analysis will fail.

### Step 2: Update `pubspec.yaml` Files
Run the repository's Dart tool script to update matching `pubspec.yaml` files cross-platform:

```bash
dart dev/tools/bin/bump_version_constraints.dart <OLD_VERSION_CONSTRAINT> <NEW_VERSION_CONSTRAINT>
```
*Example:* `dart dev/tools/bin/bump_version_constraints.dart ^3.10.0-0 ^3.11.0-0`

* The script only updates packages whose current SDK constraint matches `<OLD_VERSION_CONSTRAINT>`. If it encounters packages with deviating constraints (e.g. higher SDK versions like `^3.12.0` or custom ranges), it leaves them untouched and prints a message flagging them to the user.

### Step 3: Update Dependency Checksums and Hashes
Flutter enforces dependency integrity via checksums. Run the `update-packages` tool to re-solve the package workspace, generate updated `pubspec.lock` files, and update the checksums:

```bash
flutter update-packages --force-upgrade --update-hashes
```

### Step 4: Run Static Analysis
Verify the new constraints solve correctly and do not introduce any analyzer errors, warnings, lints (infos), or deprecations.

Run static analysis:
```bash
flutter analyze --flutter-repo
```
* Treat any non-zero exit code from `flutter analyze` as a failure. Do not ignore `info` (lint) or `warning` diagnostics, as the Flutter repository requires all analysis issues to be clean. Pay close attention to newly firing lints or deprecated lint rule warnings.

### Step 5: Report Status, Write Results File, and Prepare Pull Request
1. **Write Results File in Workspace Root:**
   Always write a detailed report of the bump execution to a file named `bump_results.md` in the workspace root (e.g., `<flutter_root>/bump_results.md`). The file must include:
   - Target SDK version and current Engine SDK version.
   - The exact bump command run.
   - Count/details of updated `pubspec.yaml` files.
   - List of skipped/flagged packages with their constraints.
   - Results of the `update-packages` and static analysis runs (highlighting any failures, warnings, or newly firing lints).
2. **Handle Failure/Success:**
   - If static analysis fails (even if it only contains `info` or `warning` diagnostics like `prefer_initializing_formals` or `deprecated_lint`), list the failures/warnings in `bump_results.md`, report them to the user, and ask for guidance (or proceed to fix them if instructed).
   - If static analysis passes, point the user to `bump_results.md` in the workspace root, show a summary of modified files (`git status`), and prompt the user to commit the changes and prepare a pull request.
````

## File: README.md
upstream: https://github.com/flutter/flutter/blob/master/README.md

```text
<a href="https://flutter.dev/">
  <h1 align="center">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://docs.flutter.dev/logo_dark.png">
      <img alt="Flutter" src="https://docs.flutter.dev/logo.png">
    </picture>
  </h1>
</a>

[![Flutter CI Status](https://flutter-dashboard.appspot.com/api/public/build-status-badge?repo=flutter)](https://flutter-dashboard.appspot.com/#/build?repo=flutter)
[![Discord badge][]][Discord instructions]
[![Twitter handle][]][Twitter badge]
[![BlueSky badge][]][BlueSky handle]
[![LFX Health Score](https://insights.linuxfoundation.org/api/badge/health-score?project=flutter)](https://insights.linuxfoundation.org/project/flutter)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5631/badge)](https://bestpractices.coreinfrastructure.org/projects/5631)
[![SLSA 1](https://slsa.dev/images/gh-badge-level1.svg)](https://slsa.dev)

Flutter is Google's SDK for crafting beautiful, fast user experiences for
mobile, web, and desktop from a single codebase. Flutter works with existing
code, is used by developers and organizations around the world, and is free and
open source.

## Documentation

* [Install Flutter](https://docs.flutter.dev/get-started)
* [Flutter documentation](https://docs.flutter.dev)
* [Development wiki](./docs/README.md)
* [Contributing to Flutter](https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md)

For release and other announcements, join the
[flutter-announce](https://groups.google.com/g/flutter-announce)
mailing list. Our documentation also tracks [breaking
changes](https://docs.flutter.dev/release/breaking-changes) across releases.

## Terms of service

The Flutter tool may occasionally download resources from Google servers. By
downloading or using the Flutter SDK, you agree to the Google Terms of Service:
https://policies.google.com/terms

For example, when installed from GitHub (as opposed to from a prepackaged
archive), the Flutter tool will download the Dart SDK from Google servers
immediately when first run, as it is used to execute the `flutter` tool itself.
This will also occur when Flutter is upgraded (e.g. by running the `flutter
upgrade` command).

## About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive,
extensible and open development model, whether you're targeting iOS or Android,
web, Windows, macOS, Linux or embedding it as the UI toolkit for a platform of
your choice.

### Beautiful user experiences

We want to enable designers to deliver their full creative vision without being
forced to water it down due to limitations of the underlying framework.
Flutter's [layered architecture] gives you control over every pixel on the
screen and its powerful compositing capabilities let you overlay and animate
graphics, video, text, and controls without limitation. Flutter includes a full
[set of widgets][widget catalog] that deliver pixel-perfect experiences whether
you're building for iOS ([Cupertino]) or other platforms ([Material]), along with
support for customizing or creating entirely new visual components.

<p align="center"><img src="https://github.com/flutter/website/blob/main/sites/docs/web/assets/images/docs/homepage/reflectly-hero-600px.png?raw=true" alt="Reflectly hero image"></p>

### Fast results

Flutter is fast. It's powered by hardware-accelerated 2D graphics
libraries like [Skia] (which underpins Chrome and Android) and
[Impeller]. We architected Flutter to
support glitch-free, jank-free graphics at the native speed of your device.

Flutter code is powered by the world-class [Dart programming language], which enables
compilation to 32-bit and 64-bit ARM machine code for iOS and Android,
JavaScript and WebAssembly for the web, as well as Intel x64 and ARM
for desktop devices.

<p align="center"><img src="https://github.com/flutter/website/blob/main/sites/docs/web/assets/images/docs/homepage/dart-diagram-small.png?raw=true" alt="Dart diagram"></p>

### Productive development

Flutter offers [stateful hot reload][Hot reload], allowing you to make changes to your code
and see the results instantly without restarting your app or losing its state.

[![Hot reload animation][]][Hot reload]

### Extensible and open model

Flutter works with any development tool (or none at all), and also includes
editor plug-ins for both [Visual Studio Code] and [IntelliJ / Android Studio].
Flutter provides [tens of thousands of packages][Flutter packages] to speed your
development, regardless of your target platform. And accessing other native code
is easy, with support for both FFI ([on Android][Android FFI], [on iOS][iOS FFI],
[on macOS][macOS FFI], [on Linux][Linux FFI], and [on Windows][Windows FFI]) as well as
[platform-specific APIs][platform channels].

Flutter is a fully open-source project, and we welcome contributions.
Information on how to get started can be found in our
[contributor guide](CONTRIBUTING.md).

[flutter.dev]: https://flutter.dev
[Discord instructions]: ./docs/contributing/Chat.md
[Discord badge]: https://img.shields.io/discord/608014603317936148?logo=discord
[Twitter handle]: https://img.shields.io/twitter/follow/flutterdev.svg?style=social&label=Follow
[Twitter badge]: https://twitter.com/intent/follow?screen_name=flutterdev
[BlueSky badge]: https://img.shields.io/badge/Bluesky-0285FF?logo=bluesky&logoColor=fff&label=Follow%20me%20on&color=0285FF
[BlueSky handle]: https://bsky.app/profile/flutter.dev
[layered architecture]: https://docs.flutter.dev/resources/inside-flutter
[architectural overview]: https://docs.flutter.dev/resources/architectural-overview
[widget catalog]: https://docs.flutter.dev/ui/widgets
[Cupertino]: https://docs.flutter.dev/ui/widgets/cupertino
[Material]: https://docs.flutter.dev/ui/widgets/material
[Skia]: https://skia.org/
[Dart programming language]: https://dart.dev/
[Hot reload animation]: https://github.com/flutter/website/blob/main/sites/docs/web/assets/images/docs/tools/android-studio/hot-reload.gif?raw=true
[Hot reload]: https://docs.flutter.dev/tools/hot-reload
[Visual Studio Code]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[IntelliJ / Android Studio]: https://plugins.jetbrains.com/plugin/9212-flutter
[Flutter packages]: https://pub.dev/flutter
[Android FFI]: https://docs.flutter.dev/platform-integration/android/c-interop
[iOS FFI]: https://docs.flutter.dev/platform-integration/ios/c-interop
[macOS FFI]: https://docs.flutter.dev/platform-integration/macos/c-interop
[Linux FFI]: https://docs.flutter.dev/platform-integration/linux/building#integrate-with-linux
[Windows FFI]: https://docs.flutter.dev/platform-integration/windows/building#integrating-with-windows
[platform channels]: https://docs.flutter.dev/platform-integration/platform-channels
[interop example]: https://github.com/flutter/flutter/tree/main/examples/platform_channel
[Impeller]: https://docs.flutter.dev/perf/impeller
```
