diff --git a/src/_includes/docs/swift-package-manager/how-to-enable-disable.md b/src/_includes/docs/swift-package-manager/how-to-enable-disable.md index e401feabc66..752fbf3eb97 100644 --- a/src/_includes/docs/swift-package-manager/how-to-enable-disable.md +++ b/src/_includes/docs/swift-package-manager/how-to-enable-disable.md @@ -50,16 +50,23 @@ instructions. ### Turn off for a single project In the project's `pubspec.yaml` file, under the `flutter` section, -add `disable-swift-package-manager: true`. +set `enable-swift-package-manager` to `false` in the `config` subsection. ```yaml title="pubspec.yaml" # The following section is specific to Flutter packages. flutter: - disable-swift-package-manager: true + config: + enable-swift-package-manager: false ``` This turns off Swift Package Manager for all contributors to this project. +:::note Migrating from deprecated syntax +If you were previously using `disable-swift-package-manager: true`, +update your `pubspec.yaml` to use the new `config` section format shown above. +The old syntax is deprecated and will produce an error in Flutter 3.38 and later. +::: + ### Turn off globally for all projects Run the following command: