From 7f1ede2987e22ca74e9c0d18c8756b93b2396e6c Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Mon, 11 Aug 2025 14:38:35 -0700 Subject: [PATCH 1/4] Document flags that can be enabled in .pubspec --- src/content/tools/pubspec.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/content/tools/pubspec.md b/src/content/tools/pubspec.md index a7fbec1e89..a33db6de16 100644 --- a/src/content/tools/pubspec.md +++ b/src/content/tools/pubspec.md @@ -85,7 +85,7 @@ dev_dependencies: [!generate: true!] # Enables generation of localized strings from arb files - [!config:!] # App-specific configuration flags that mirror flutter config + [!config:!] # App-specific configuration flags that mirror `flutter config` [!enable-swift-package-manager: true!] [!assets:!] # Lists assets, such as image files @@ -240,6 +240,15 @@ flutter: Flags are only read from the current _application_ package, and have no effect in the context of a package or dependency. +Keys include: + +* `cli-animations`, which disables the `flutter` CLI's animations if set to `false`. + Defaults to `true`. +* `enable-swift-package-manager`, which enables [Swift Package Manager integration][] + for iOS and macOS projects. + +[Swift Package Manager integration]: /packages-and-plugins/swift-package-manager/for-app-developers + ### default-flavor field Assign a default Flutter flavor for an app. From 1f6469c7c226dfd4a48778b4f0fdfc15366e9d63 Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Mon, 11 Aug 2025 14:48:07 -0700 Subject: [PATCH 2/4] Improve --- src/content/tools/pubspec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/tools/pubspec.md b/src/content/tools/pubspec.md index a33db6de16..3d310e920c 100644 --- a/src/content/tools/pubspec.md +++ b/src/content/tools/pubspec.md @@ -244,8 +244,8 @@ Keys include: * `cli-animations`, which disables the `flutter` CLI's animations if set to `false`. Defaults to `true`. -* `enable-swift-package-manager`, which enables [Swift Package Manager integration][] - for iOS and macOS projects. +* `enable-swift-package-manager`, which enables the + [Swift Package Manager integration][] for iOS and macOS projects. [Swift Package Manager integration]: /packages-and-plugins/swift-package-manager/for-app-developers From 684a6177d571cb698e62e9971b74598da85bed8e Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Mon, 11 Aug 2025 15:11:23 -0700 Subject: [PATCH 3/4] Switch to flutter config --help --- src/content/tools/pubspec.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/content/tools/pubspec.md b/src/content/tools/pubspec.md index 3d310e920c..f4dbc1d9fa 100644 --- a/src/content/tools/pubspec.md +++ b/src/content/tools/pubspec.md @@ -229,26 +229,18 @@ is executed. > [#167953]({{site.github}}/flutter/flutter/pull/167953) on the `main` > channel. -The available keys mirror those available in `flutter config --list`. +The available keys mirror those available in `flutter config --help`. ```yaml title="pubspec.yaml" flutter: config: + cli-animations: false enable-swift-package-manager: true ``` Flags are only read from the current _application_ package, and have no effect in the context of a package or dependency. -Keys include: - -* `cli-animations`, which disables the `flutter` CLI's animations if set to `false`. - Defaults to `true`. -* `enable-swift-package-manager`, which enables the - [Swift Package Manager integration][] for iOS and macOS projects. - -[Swift Package Manager integration]: /packages-and-plugins/swift-package-manager/for-app-developers - ### default-flavor field Assign a default Flutter flavor for an app. From 95da1c9139864ad84b2edc06d3acea134115b43d Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Mon, 11 Aug 2025 15:20:23 -0700 Subject: [PATCH 4/4] Tweak --- src/content/tools/pubspec.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/tools/pubspec.md b/src/content/tools/pubspec.md index f4dbc1d9fa..608505299e 100644 --- a/src/content/tools/pubspec.md +++ b/src/content/tools/pubspec.md @@ -229,7 +229,7 @@ is executed. > [#167953]({{site.github}}/flutter/flutter/pull/167953) on the `main` > channel. -The available keys mirror those available in `flutter config --help`. +The available keys mirror those available in `flutter config --list`. ```yaml title="pubspec.yaml" flutter: @@ -238,6 +238,8 @@ flutter: enable-swift-package-manager: true ``` +Use `flutter config --help` for a description of each flag. + Flags are only read from the current _application_ package, and have no effect in the context of a package or dependency.