diff --git a/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml b/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml index b851f5b6d..e90400510 100644 --- a/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml +++ b/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml @@ -1,10 +1,10 @@ -name: flutter_module_using_plugin +name: flutter_module_using_plugin_android_view description: An example Flutter module that uses a plugin. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/add_to_app/books/flutter_module_books/pubspec.yaml b/add_to_app/books/flutter_module_books/pubspec.yaml index 13acb9a51..2cd8f4d6f 100644 --- a/add_to_app/books/flutter_module_books/pubspec.yaml +++ b/add_to_app/books/flutter_module_books/pubspec.yaml @@ -2,11 +2,11 @@ name: flutter_module_books description: A Flutter module using the Pigeon package to demonstrate integrating Flutter in a realistic scenario where the existing platform app already has business logic and middleware constraints. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/add_to_app/fullscreen/flutter_module/pubspec.yaml b/add_to_app/fullscreen/flutter_module/pubspec.yaml index 50a9769c5..2bab790a7 100644 --- a/add_to_app/fullscreen/flutter_module/pubspec.yaml +++ b/add_to_app/fullscreen/flutter_module/pubspec.yaml @@ -1,10 +1,10 @@ -name: flutter_module +name: flutter_module_fullscreen description: An example Flutter module. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml b/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml index 23da54cba..46d731dbb 100644 --- a/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml +++ b/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml @@ -1,10 +1,10 @@ name: multiple_flutters_module description: A module that is embedded in the multiple_flutters_ios and multiple_flutters_android sample code. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml b/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml index 76c39bccf..d40781b8a 100644 --- a/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml +++ b/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml @@ -1,10 +1,10 @@ name: flutter_module_using_plugin description: An example Flutter module that uses a plugin. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/add_to_app/prebuilt_module/flutter_module/pubspec.yaml b/add_to_app/prebuilt_module/flutter_module/pubspec.yaml index 50a9769c5..78dec1a18 100644 --- a/add_to_app/prebuilt_module/flutter_module/pubspec.yaml +++ b/add_to_app/prebuilt_module/flutter_module/pubspec.yaml @@ -1,10 +1,10 @@ name: flutter_module description: An example Flutter module. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/analysis_defaults/pubspec.yaml b/analysis_defaults/pubspec.yaml index 6281cac0f..cace7cfc8 100644 --- a/analysis_defaults/pubspec.yaml +++ b/analysis_defaults/pubspec.yaml @@ -1,13 +1,14 @@ name: analysis_defaults description: Analysis defaults for flutter/samples publish_to: none +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' # NOTE: Code is not allowed in this package. Do not add more dependencies. # The `flutter_lints` dependency is required for `lib/flutter.yaml`. dependencies: - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 diff --git a/android_splash_screen/pubspec.yaml b/android_splash_screen/pubspec.yaml index 4051e18c8..95f0d309a 100644 --- a/android_splash_screen/pubspec.yaml +++ b/android_splash_screen/pubspec.yaml @@ -1,12 +1,11 @@ name: splash_screen_sample description: A sample Flutter app with animated splash screen on Android 12. - publish_to: "none" - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/animations/pubspec.yaml b/animations/pubspec.yaml index 2651538b6..e714bf417 100644 --- a/animations/pubspec.yaml +++ b/animations/pubspec.yaml @@ -2,15 +2,16 @@ name: animations description: A new Flutter project. version: 1.0.0+1 publish_to: none +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: sdk: flutter flutter_animate: ^4.1.0 - go_router: ^15.0.0 + go_router: ^16.0.0 window_size: # plugin is not yet part of the flutter framework git: url: https://github.com/google/flutter-desktop-embedding.git diff --git a/asset_transformation/pubspec.yaml b/asset_transformation/pubspec.yaml index fe790a3aa..d50e17968 100644 --- a/asset_transformation/pubspec.yaml +++ b/asset_transformation/pubspec.yaml @@ -2,9 +2,10 @@ name: asset_transformation description: "A new Flutter project." publish_to: 'none' version: 0.1.0 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -14,7 +15,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 vector_graphics_compiler: ^1.1.11+1 grayscale_transformer: path: ./grayscale_transformer diff --git a/background_isolate_channels/pubspec.yaml b/background_isolate_channels/pubspec.yaml index 79296eaed..ca8d07acc 100644 --- a/background_isolate_channels/pubspec.yaml +++ b/background_isolate_channels/pubspec.yaml @@ -1,12 +1,13 @@ name: background_isolate_channels description: A new Flutter project. +resolution: workspace publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: cupertino_icons: ^1.0.2 diff --git a/code_sharing/client/pubspec.yaml b/code_sharing/client/pubspec.yaml index fd75151a7..3bdf2d564 100644 --- a/code_sharing/client/pubspec.yaml +++ b/code_sharing/client/pubspec.yaml @@ -2,9 +2,10 @@ name: client description: A Flutter app which communicates with a Dart backend using shared business logic. publish_to: "none" version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: cupertino_icons: ^1.0.2 @@ -15,7 +16,7 @@ dependencies: path: ../shared dev_dependencies: - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter_test: sdk: flutter diff --git a/code_sharing/server/pubspec.yaml b/code_sharing/server/pubspec.yaml index 396a8dd49..763ff315e 100644 --- a/code_sharing/server/pubspec.yaml +++ b/code_sharing/server/pubspec.yaml @@ -2,9 +2,10 @@ name: server description: A server app using the shelf package and Docker. version: 1.0.0 publish_to: "none" +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: args: ^2.0.0 diff --git a/code_sharing/shared/pubspec.yaml b/code_sharing/shared/pubspec.yaml index 9de78c2f7..1bace6530 100644 --- a/code_sharing/shared/pubspec.yaml +++ b/code_sharing/shared/pubspec.yaml @@ -1,9 +1,10 @@ name: shared description: Common data models required by our client and server version: 1.0.0 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: freezed_annotation: ">=2.1.0 <4.0.0" diff --git a/context_menus/pubspec.yaml b/context_menus/pubspec.yaml index c691e5d6e..bdb370fbb 100644 --- a/context_menus/pubspec.yaml +++ b/context_menus/pubspec.yaml @@ -1,5 +1,7 @@ name: context_menus description: A new Flutter project. +version: 1.0.0+1 +resolution: workspace # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -17,10 +19,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 + environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/date_planner/pubspec.yaml b/date_planner/pubspec.yaml index c25134108..8346ed09b 100644 --- a/date_planner/pubspec.yaml +++ b/date_planner/pubspec.yaml @@ -2,9 +2,10 @@ name: date_planner description: "An iOS-style date planner." publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 0.1.0 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -15,4 +16,4 @@ dependencies: uuid: dev_dependencies: - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 diff --git a/deeplink_store_example/pubspec.yaml b/deeplink_store_example/pubspec.yaml index d93c97383..7e9d529e2 100644 --- a/deeplink_store_example/pubspec.yaml +++ b/deeplink_store_example/pubspec.yaml @@ -1,5 +1,8 @@ name: deeplink_store_example description: A new Flutter project. +version: 1.0.0+1 +resolution: workspace + # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -16,10 +19,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 + environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -35,7 +38,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 shrine_images: ^2.0.2 - go_router: ^15.0.0 + go_router: ^16.0.0 dev_dependencies: flutter_test: @@ -45,7 +48,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/desktop_photo_search/fluent_ui/pubspec.yaml b/desktop_photo_search/fluent_ui/pubspec.yaml index 9244e626f..56b4a7e1b 100644 --- a/desktop_photo_search/fluent_ui/pubspec.yaml +++ b/desktop_photo_search/fluent_ui/pubspec.yaml @@ -2,9 +2,10 @@ name: desktop_photo_search description: Search for Photos, using the Unsplash API. publish_to: 'none' version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: built_collection: ^5.1.1 diff --git a/desktop_photo_search/material/pubspec.yaml b/desktop_photo_search/material/pubspec.yaml index 46a42b347..f8e410a41 100644 --- a/desktop_photo_search/material/pubspec.yaml +++ b/desktop_photo_search/material/pubspec.yaml @@ -1,10 +1,11 @@ -name: desktop_photo_search +name: desktop_photo_search_material description: Search for Photos, using the Unsplash API. publish_to: 'none' version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: built_collection: ^5.1.1 @@ -20,7 +21,6 @@ dependencies: git: url: https://github.com/google/flutter-desktop-embedding.git path: plugins/menubar - ref: 6c66ad23ee79749f30a8eece542cf54eaf157ed8 provider: ^6.0.5 transparent_image: ^2.0.1 url_launcher: ^6.1.12 @@ -29,7 +29,6 @@ dependencies: git: url: https://github.com/google/flutter-desktop-embedding.git path: plugins/window_size - ref: 6c66ad23ee79749f30a8eece542cf54eaf157ed8 dev_dependencies: analysis_defaults: diff --git a/dynamic_theme/pubspec.yaml b/dynamic_theme/pubspec.yaml index 8912c4e3e..ad18b9961 100644 --- a/dynamic_theme/pubspec.yaml +++ b/dynamic_theme/pubspec.yaml @@ -2,8 +2,9 @@ name: dynamic_theme description: "Sample app for the google_generative_ai package" publish_to: 'none' version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -15,7 +16,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter: uses-material-design: true diff --git a/experimental/README.md b/experimental/README.md index 801e2042d..320abf4d8 100644 --- a/experimental/README.md +++ b/experimental/README.md @@ -1,7 +1,6 @@ -# Deprecation warning +# Deprecated -The `experimental` directory will be retired with the release of Flutter 3.32, -tentatively scheduled for May 2025. At that time, remaining samples will be deleted. +The `experimental` directory has been deprecated. All samples within have been deleted or moved to [github.com/flutter/demos][] --- diff --git a/flutter_maps_firestore/lib/main.dart b/flutter_maps_firestore/lib/main.dart index bdc5913f1..9b2244783 100644 --- a/flutter_maps_firestore/lib/main.dart +++ b/flutter_maps_firestore/lib/main.dart @@ -8,7 +8,6 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_webservice/places.dart'; import 'api_key.dart'; @@ -17,7 +16,6 @@ const initialPosition = LatLng(37.7786, -122.4375); // Hue used by the Google Map Markers to match the theme const _pinkHue = 350.0; // Places API client used for Place Photos -final _placesApiClient = GoogleMapsPlaces(apiKey: googleMapsApiKey); Future main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -73,24 +71,24 @@ class _HomePageState extends State { builder: (context, snapshot) { return switch (snapshot) { AsyncSnapshot(hasError: true) => Center( - child: Text('Error: ${snapshot.error}'), - ), + child: Text('Error: ${snapshot.error}'), + ), AsyncSnapshot(hasData: false) => const Center( - child: Text('Loading...'), - ), + child: Text('Loading...'), + ), _ => Stack( - children: [ - StoreMap( - documents: snapshot.data!.docs, - initialPosition: initialPosition, - mapController: _mapController, - ), - StoreCarousel( - mapController: _mapController, - documents: snapshot.data!.docs, - ), - ], - ), + children: [ + StoreMap( + documents: snapshot.data!.docs, + initialPosition: initialPosition, + mapController: _mapController, + ), + StoreCarousel( + mapController: _mapController, + documents: snapshot.data!.docs, + ), + ], + ), }; }, ), @@ -255,7 +253,8 @@ class StoreMap extends StatelessWidget { @override Widget build(BuildContext context) { return GoogleMap( - initialCameraPosition: CameraPosition(target: initialPosition, zoom: 12), + initialCameraPosition: + CameraPosition(target: initialPosition, zoom: 12), markers: documents .map( (document) => Marker( diff --git a/flutter_maps_firestore/pubspec.yaml b/flutter_maps_firestore/pubspec.yaml index cc7dd654e..b09b449c7 100644 --- a/flutter_maps_firestore/pubspec.yaml +++ b/flutter_maps_firestore/pubspec.yaml @@ -1,9 +1,10 @@ name: flutter_maps_firestore description: A new Flutter project. version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -11,7 +12,6 @@ dependencies: cloud_firestore: ">=4.6.0 <6.0.0" firebase_core: ">=2.11.0 <4.0.0" google_maps_flutter: ^2.2.6 - google_maps_webservice: ^0.0.20-nullsafety.5 location: ^7.0.0 dev_dependencies: diff --git a/form_app/pubspec.yaml b/form_app/pubspec.yaml index 7994531ab..8c9ed12ec 100644 --- a/form_app/pubspec.yaml +++ b/form_app/pubspec.yaml @@ -2,9 +2,10 @@ name: form_app description: A sample demonstrating different types of forms and best practices publish_to: "none" version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -18,7 +19,7 @@ dependencies: git: url: https://github.com/google/flutter-desktop-embedding.git path: plugins/window_size - go_router: ^15.0.0 + go_router: ^16.0.0 dev_dependencies: analysis_defaults: diff --git a/game_template/pubspec.yaml b/game_template/pubspec.yaml index 2b7cc70fc..e0bbf5535 100644 --- a/game_template/pubspec.yaml +++ b/game_template/pubspec.yaml @@ -1,20 +1,21 @@ name: game_template description: A mobile game built in Flutter. +version: 0.0.1+1 +resolution: workspace # Prevent accidental publishing to pub.dev. publish_to: 'none' -version: 0.0.1+1 environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: sdk: flutter audioplayers: ^6.0.0 cupertino_icons: ^1.0.2 - go_router: ^15.0.0 + go_router: ^16.0.0 logging: ^1.1.0 provider: ^6.0.2 shared_preferences: ^2.0.13 @@ -29,7 +30,7 @@ dependencies: in_app_purchase: ^3.0.1 # In-app purchases dev_dependencies: - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter_test: sdk: flutter flutter_launcher_icons: ^0.14.0 diff --git a/gemini_tasks/pubspec.yaml b/gemini_tasks/pubspec.yaml index 991452eba..88509d39a 100644 --- a/gemini_tasks/pubspec.yaml +++ b/gemini_tasks/pubspec.yaml @@ -2,8 +2,9 @@ name: gemini_tasks description: "Sample app for the google_generative_ai package" publish_to: 'none' version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -15,7 +16,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter: uses-material-design: true diff --git a/google_maps/pubspec.yaml b/google_maps/pubspec.yaml index d4eee4f2d..9a6c395c5 100644 --- a/google_maps/pubspec.yaml +++ b/google_maps/pubspec.yaml @@ -1,10 +1,11 @@ name: google_maps_in_flutter description: A new Flutter project. +resolution: workspace publish_to: 'none' version: 1.0.0+1 environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/infinite_list/pubspec.yaml b/infinite_list/pubspec.yaml index fa741de67..33d1a1e22 100644 --- a/infinite_list/pubspec.yaml +++ b/infinite_list/pubspec.yaml @@ -2,10 +2,11 @@ name: infinitelist description: > A sample implementation of an infinite list. publish_to: none +resolution: workspace version: 1.0.0+1 environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/ios_app_clip/pubspec.yaml b/ios_app_clip/pubspec.yaml index d0a3ef40e..59b18bd55 100644 --- a/ios_app_clip/pubspec.yaml +++ b/ios_app_clip/pubspec.yaml @@ -1,12 +1,11 @@ name: ios_app_clip description: An example Flutter project that can build as an App Clip. - publish_to: "none" # Remove this line if you wish to publish to pub.dev - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/isolate_example/pubspec.yaml b/isolate_example/pubspec.yaml index a50f17f34..20a414d53 100644 --- a/isolate_example/pubspec.yaml +++ b/isolate_example/pubspec.yaml @@ -2,9 +2,10 @@ name: isolate_example description: A Flutter sample to demonstrate isolates version: 1.0.0+1 publish_to: none +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/jsonexample/README.md b/jsonexample/README.md deleted file mode 100644 index d3835cb87..000000000 --- a/jsonexample/README.md +++ /dev/null @@ -1,10 +0,0 @@ -## `jsonexample` sample retired - -The `jsonexample` sample has reached the end of it's useful life. It was great code -when it has written, but the world has changed. Dart 3 introduced Patterns and -records. There is also various JSON parsing tools like `json_serializable`. - -For further information, please see: - - The [Dive into Dart's patterns and records](https://codelabs.developers.google.com/codelabs/dart-patterns-records) - codelab for a deep dive into Dart 3's patterns and records with an application to parsing JSON - - The Flutter.dev documentation on [JSON and serialization](https://docs.flutter.dev/data-and-backend/serialization/json) \ No newline at end of file diff --git a/material_3_demo/pubspec.yaml b/material_3_demo/pubspec.yaml index ab0817840..59c024332 100644 --- a/material_3_demo/pubspec.yaml +++ b/material_3_demo/pubspec.yaml @@ -2,13 +2,12 @@ name: material_3_demo description: A Flutter project showcasing supported Material 3 components, typography, color system and elevation. Supports different light/dark mode, color seed, and comparison to Material 2. - publish_to: "none" - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/navigation_and_routing/pubspec.yaml b/navigation_and_routing/pubspec.yaml index 0cf64858a..0d4cf59cc 100644 --- a/navigation_and_routing/pubspec.yaml +++ b/navigation_and_routing/pubspec.yaml @@ -2,16 +2,17 @@ name: bookstore description: Navigation and routing sample app publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: adaptive_navigation: ^0.0.3 cupertino_icons: ^1.0.2 flutter: sdk: flutter - go_router: ^15.0.0 + go_router: ^16.0.0 url_launcher: ^6.1.1 window_size: git: diff --git a/pedometer/example/pubspec.yaml b/pedometer/example/pubspec.yaml index 2791c3957..5d95e3ce4 100644 --- a/pedometer/example/pubspec.yaml +++ b/pedometer/example/pubspec.yaml @@ -1,5 +1,8 @@ name: pedometer_example description: Demonstrates how to use the pedometer plugin. +version: 1.0.0+1 +resolution: workspace + # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -16,10 +19,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 + environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -41,7 +44,7 @@ dependencies: ffi: ^2.1.2 intl: ^0.20.0 - jni: ^0.13.0 + jni: ^0.14.2 fl_chart: ^0.70.0 dev_dependencies: @@ -53,7 +56,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/pedometer/pubspec.yaml b/pedometer/pubspec.yaml index 01cfe29ef..2d72db684 100644 --- a/pedometer/pubspec.yaml +++ b/pedometer/pubspec.yaml @@ -2,23 +2,24 @@ name: pedometer description: A new Flutter FFI plugin project. version: 0.0.1 publish_to: none +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: sdk: flutter plugin_platform_interface: ^2.1.8 - jni: ^0.13.0 + jni: ^0.14.2 ffi: ^2.1.2 dev_dependencies: ffigen: ^19.1.0 - jnigen: ^0.13.1 + jnigen: ^0.14.2 flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/place_tracker/pubspec.yaml b/place_tracker/pubspec.yaml index f2d1fdfc6..32577d4fb 100644 --- a/place_tracker/pubspec.yaml +++ b/place_tracker/pubspec.yaml @@ -1,10 +1,10 @@ name: place_tracker description: A new Flutter project. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -13,7 +13,7 @@ dependencies: google_maps_flutter: ^2.2.0 provider: ^6.0.2 uuid: ^4.0.0 - go_router: ">=10.0.0 <16.0.0" + go_router: ^16.0.0 dev_dependencies: analysis_defaults: diff --git a/platform_channels/pubspec.yaml b/platform_channels/pubspec.yaml index e887802ad..4582b0d9b 100644 --- a/platform_channels/pubspec.yaml +++ b/platform_channels/pubspec.yaml @@ -1,16 +1,16 @@ name: platform_channels description: A new Flutter project. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.3 - go_router: ">=10.1.0 <16.0.0" + go_router: ^16.0.0 dev_dependencies: analysis_defaults: diff --git a/platform_design/pubspec.yaml b/platform_design/pubspec.yaml index 5d03150d5..f5527ed3d 100644 --- a/platform_design/pubspec.yaml +++ b/platform_design/pubspec.yaml @@ -1,9 +1,10 @@ name: platform_design description: A project showcasing a Flutter app following different platform IA conventions. version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: english_words: ^4.0.0 diff --git a/platform_view_swift/pubspec.yaml b/platform_view_swift/pubspec.yaml index d25fd3bdc..d2136a0f8 100644 --- a/platform_view_swift/pubspec.yaml +++ b/platform_view_swift/pubspec.yaml @@ -1,10 +1,10 @@ name: platform_view_swift description: A new Flutter project. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/provider_counter/pubspec.yaml b/provider_counter/pubspec.yaml index 84ef77e8d..7c3b5887a 100644 --- a/provider_counter/pubspec.yaml +++ b/provider_counter/pubspec.yaml @@ -3,9 +3,10 @@ description: > The starter Flutter application, but using Provider to manage state. publish_to: none version: 1.0.0 +resolution: workspace environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/provider_shopper/pubspec.yaml b/provider_shopper/pubspec.yaml index 62fa4f2d7..c5b3d0f9a 100644 --- a/provider_shopper/pubspec.yaml +++ b/provider_shopper/pubspec.yaml @@ -1,16 +1,16 @@ name: provider_shopper description: A shopping app sample that uses Provider for state management. publish_to: none - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: sdk: flutter - go_router: ^15.0.0 + go_router: ^16.0.0 provider: ^6.0.2 window_size: git: diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 000000000..188e2bc63 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,51 @@ +name: samples +description: A collection of samples for Dart and Flutter. + +environment: + sdk: '^3.5.0' + +workspace: + - add_to_app/android_view/flutter_module_using_plugin + - add_to_app/books/flutter_module_books + - add_to_app/fullscreen/flutter_module + - add_to_app/multiple_flutters/multiple_flutters_module + - add_to_app/plugin/flutter_module_using_plugin + - add_to_app/prebuilt_module/flutter_module + - analysis_defaults + - android_splash_screen + - animations + - asset_transformation + - background_isolate_channels + - code_sharing/client + - code_sharing/server + - code_sharing/shared + - context_menus + - date_planner + - deeplink_store_example + - desktop_photo_search/fluent_ui + - desktop_photo_search/material + - dynamic_theme + - form_app + - flutter_maps_firestore + - game_template + - gemini_tasks + - google_maps + - infinite_list + - ios_app_clip + - isolate_example + - material_3_demo + - navigation_and_routing + - pedometer + - pedometer/example + - platform_channels + - platform_design + - platform_view_swift + - provider_counter + - provider_shopper + - simple_shader + - simplistic_calculator + - simplistic_editor + - testing_app + - veggieseasons + - web_embedding/element_embedding_demo + - web_embedding/ng-flutter/flutter diff --git a/simple_shader/pubspec.yaml b/simple_shader/pubspec.yaml index 531306e9f..ac2f7ab21 100644 --- a/simple_shader/pubspec.yaml +++ b/simple_shader/pubspec.yaml @@ -2,9 +2,10 @@ name: simple_shader description: Using a shader, simply. publish_to: 'none' version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: diff --git a/simplistic_calculator/pubspec.yaml b/simplistic_calculator/pubspec.yaml index 5e7327fdf..24e1ae134 100644 --- a/simplistic_calculator/pubspec.yaml +++ b/simplistic_calculator/pubspec.yaml @@ -2,9 +2,10 @@ name: simplistic_calculator description: A new Flutter project. publish_to: 'none' version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: auto_size_text: ^3.0.0 @@ -18,7 +19,7 @@ dependencies: math_expressions: ^2.3.0 window_size: git: - url: https://github.com/google/flutter-desktop-embedding + url: https://github.com/google/flutter-desktop-embedding.git path: plugins/window_size dev_dependencies: diff --git a/simplistic_editor/pubspec.yaml b/simplistic_editor/pubspec.yaml index f57ec5d28..19b21d9eb 100644 --- a/simplistic_editor/pubspec.yaml +++ b/simplistic_editor/pubspec.yaml @@ -1,5 +1,7 @@ name: simplistic_editor description: A new Flutter project. +version: 1.0.0+1 +resolution: workspace # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -15,10 +17,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 + environment: - sdk: '>=3.35.0-0.1.pre <4.0.0' + sdk: '^3.5.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/testing_app/pubspec.yaml b/testing_app/pubspec.yaml index e058ae100..674ed5454 100644 --- a/testing_app/pubspec.yaml +++ b/testing_app/pubspec.yaml @@ -1,17 +1,17 @@ name: testing_app description: A sample that shows testing in Flutter. - version: 1.0.0+1 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.3 provider: ^6.0.2 - go_router: ">=10.0.0 <16.0.0" + go_router: ^16.0.0 dev_dependencies: analysis_defaults: diff --git a/tool/pubspec.yaml b/tool/pubspec.yaml new file mode 100644 index 000000000..86c792cce --- /dev/null +++ b/tool/pubspec.yaml @@ -0,0 +1,12 @@ +name: release_cleaner +description: A tool to automate release cleanup for the samples monorepo. +environment: + sdk: '>=3.0.0 <4.0.0' + +dependencies: + args: ^2.4.2 + io: ^1.0.4 + path: ^1.9.0 + pub_semver: ^2.1.4 + yaml: ^3.1.2 + yaml_edit: ^2.1.1 diff --git a/tool/release.dart b/tool/release.dart new file mode 100644 index 000000000..39a8f1dca --- /dev/null +++ b/tool/release.dart @@ -0,0 +1,274 @@ +import 'dart:io'; + +import 'package:args/args.dart'; +import 'package:io/ansi.dart'; +import 'package:path/path.dart' as p; +import 'package:pub_semver/pub_semver.dart'; +import 'package:yaml/yaml.dart'; +import 'package:yaml_edit/yaml_edit.dart'; + +const String logDir = 'logs'; + +late File _logFile; + +void main(List arguments) async { + final parser = ArgParser() + ..addFlag('dry-run', + negatable: false, + help: + 'Prints the commands that would be executed, but does not run them.'); + final argResults = parser.parse(arguments); + final isDryRun = argResults['dry-run'] as bool; + + setupLogging(); + + log( + styleBold + .wrap('Flutter Monorepo Update Script Started: ${DateTime.now()}')!, + stdout); + log(blue.wrap('Log file: ${_logFile.path}')!, stdout); + + if (isDryRun) { + log(yellow.wrap('--- DRY RUN MODE ---')!, stdout); + } + + if (!await isFlutterInstalled()) { + log(red.wrap('Flutter is not installed or not in PATH')!, stderr); + exit(1); + } + + log(styleBold.wrap('\n=========================================')!, stdout); + log(styleBold.wrap('Upgrading Flutter SDK')!, stdout); + log(styleBold.wrap('=========================================')!, stdout); + + if (!await runCommand('flutter', ['upgrade'], isDryRun: isDryRun)) { + log(red.wrap('Failed to upgrade Flutter SDK')!, stderr); + exit(1); + } + + final flutterVersion = await getFlutterVersion(); + if (flutterVersion == null) { + log(red.wrap('Failed to get Flutter version.'), stderr); + exit(1); + } + log(blue.wrap('Flutter upgraded to version: $flutterVersion'), stdout); + + final packages = await getWorkspacePackages(); + if (packages.isEmpty) { + log(yellow.wrap('No packages found in the root pubspec.yaml workspace.'), + stdout); + exit(0); + } + + log( + blue.wrap( + 'Found ${packages.length} Flutter project(s): ${packages.join(', ')}'), + stdout); + + final failedProjects = []; + for (final packagePath in packages) { + final success = await processProject(packagePath, flutterVersion, isDryRun); + if (!success) { + failedProjects.add(packagePath); + } + } + + printSummary(packages.length, failedProjects); + + log( + styleBold.wrap( + '\nFlutter Monorepo Update Script Completed: ${DateTime.now()}'), + stdout); + + if (failedProjects.isNotEmpty) { + exit(1); + } +} + +void setupLogging() { + final logsDir = Directory(logDir); + if (!logsDir.existsSync()) { + logsDir.createSync(recursive: true); + } + final timestamp = DateTime.now().toIso8601String().replaceAll(':', '-'); + _logFile = File(p.join(logDir, 'flutter_update_$timestamp.log')); +} + +void log(String? message, IOSink sink) { + if (message == null) return; + sink.writeln(message); + _logFile.writeAsStringSync( + '${overrideAnsiOutput(false, () => message)}\n', + mode: FileMode.append, + ); +} + +Future isFlutterInstalled() async { + try { + final result = await Process.run('flutter', ['--version']); + return result.exitCode == 0; + } catch (e) { + return false; + } +} + +Future getFlutterVersion() async { + try { + final result = await Process.run('flutter', ['--version', '--machine']); + if (result.exitCode == 0) { + final json = loadYaml(result.stdout as String) as YamlMap; + return json['frameworkVersion'] as String?; + } + } catch (e) { + log(red.wrap('Error getting Flutter version: $e'), stderr); + } + return null; +} + +Future> getWorkspacePackages() async { + final rootPubspec = File('pubspec.yaml'); + if (!rootPubspec.existsSync()) { + log(red.wrap('Root pubspec.yaml not found!'), stderr); + return []; + } + + try { + final content = await rootPubspec.readAsString(); + final yaml = loadYaml(content) as YamlMap; + final workspace = yaml['workspace'] as YamlList?; + if (workspace != null) { + return workspace.nodes.map((node) => node.value as String).toList(); + } + } catch (e) { + log(red.wrap('Error reading workspace packages: $e'), stderr); + } + return []; +} + +Future processProject( + String projectPath, String flutterVersion, bool isDryRun) async { + final projectName = p.basename(projectPath); + final projectDir = Directory(projectPath); + + if (!projectDir.existsSync()) { + log(red.wrap('Project directory not found: $projectPath'), stderr); + return false; + } + + log(styleBold.wrap('\n========================================='), stdout); + log(styleBold.wrap('Processing project: $projectName'), stdout); + log(styleBold.wrap('========================================='), stdout); + + log(blue.wrap('Updating SDK constraints to use Flutter $flutterVersion'), + stdout); + if (!isDryRun) { + if (!await updateSdkConstraints(projectPath, flutterVersion)) { + log(red.wrap('Failed to update SDK constraints for $projectName'), + stderr); + return false; + } + } + + final commands = [ + Command('Updating dependencies...', 'flutter', ['pub', 'upgrade']), + Command('Running pub get...', 'flutter', ['pub', 'get']), + Command('Running dart analyze...', 'dart', ['analyze']), + Command('Running dart format...', 'dart', ['format', '.']), + Command('Running tests...', 'flutter', ['test']), + ]; + + for (final command in commands) { + log(blue.wrap(command.description), stdout); + if (!await runCommand(command.executable, command.arguments, + workingDirectory: projectPath, isDryRun: isDryRun)) { + log(red.wrap('${command.description} failed for $projectName'), stderr); + // For analyze, format, and test, we might not want to hard fail the whole script. + // The original script continued on format errors but failed on test errors. + if (command.executable == 'flutter' && + command.arguments.first == 'test') { + return false; + } + } + } + + log(green.wrap('Successfully processed $projectName'), stdout); + return true; +} + +Future updateSdkConstraints( + String projectDir, String versionString) async { + final pubspecFile = File(p.join(projectDir, 'pubspec.yaml')); + if (!pubspecFile.existsSync()) { + log(red.wrap('pubspec.yaml not found in $projectDir'), stderr); + return false; + } + + try { + final version = Version.parse(versionString); + final nextMajor = version.major + 1; + final newConstraint = "'>=${version} <$nextMajor.0.0'"; + + final content = await pubspecFile.readAsString(); + final editor = YamlEditor(content); + editor.update(['environment', 'sdk'], newConstraint); + + await pubspecFile.writeAsString(editor.toString()); + log( + blue.wrap( + 'Updated Dart SDK constraint in $projectDir to: $newConstraint'), + stdout); + return true; + } catch (e) { + log(red.wrap('Failed to update SDK constraint in $projectDir: $e'), stderr); + return false; + } +} + +Future runCommand(String executable, List arguments, + {String? workingDirectory, bool isDryRun = false}) async { + final commandString = '$executable ${arguments.join(' ')}'; + if (isDryRun) { + log( + yellow.wrap( + ' [DRY RUN] Would execute: `$commandString` in `${workingDirectory ?? '.'}`'), + stdout); + return true; + } + + final process = await Process.start(executable, arguments, + workingDirectory: workingDirectory, runInShell: true); + + final stdoutFuture = + process.stdout.transform(SystemEncoding().decoder).forEach((line) { + log(line, stdout); + }); + final stderrFuture = + process.stderr.transform(SystemEncoding().decoder).forEach((line) { + log(red.wrap(line), stderr); + }); + + await Future.wait([stdoutFuture, stderrFuture]); + + return await process.exitCode == 0; +} + +void printSummary(int total, List failed) { + log(styleBold.wrap('\n========================================='), stdout); + log(styleBold.wrap('Update Summary'), stdout); + log(styleBold.wrap('========================================='), stdout); + log(blue.wrap('Total projects processed: $total'), stdout); + log(green.wrap('Successful: ${total - failed.length}'), stdout); + + if (failed.isNotEmpty) { + log(red.wrap('Failed: ${failed.length}'), stderr); + log(red.wrap('Failed projects: ${failed.join(', ')}'), stderr); + } +} + +class Command { + final String description; + final String executable; + final List arguments; + + Command(this.description, this.executable, this.arguments); +} diff --git a/tool/release_cleanup.sh b/tool/release_cleanup.sh index a66a1ceee..aeea28c02 100755 --- a/tool/release_cleanup.sh +++ b/tool/release_cleanup.sh @@ -2,8 +2,6 @@ set -e -DIR="${BASH_SOURCE%/*}" - # Configuration LOGS_DIR="logs" LOG_FILE="$LOGS_DIR/flutter_update_$(date +%Y-%m-%d_%H-%M-%S).log" diff --git a/veggieseasons/lib/screens/home.dart b/veggieseasons/lib/screens/home.dart index 123716eaa..4d10dec29 100644 --- a/veggieseasons/lib/screens/home.dart +++ b/veggieseasons/lib/screens/home.dart @@ -21,7 +21,12 @@ class HomeScreen extends StatelessWidget { @override Widget build(BuildContext context) { - final index = _getSelectedIndex(GoRouter.of(context).location); + final String location = GoRouter.of(context) + .routerDelegate + .currentConfiguration + .uri + .toString(); + final index = _getSelectedIndex(location); return RestorationScope( restorationId: restorationId, child: CupertinoPageScaffold( diff --git a/veggieseasons/lib/widgets/veggie_headline.dart b/veggieseasons/lib/widgets/veggie_headline.dart index e2a2277cb..89ee4c9f6 100644 --- a/veggieseasons/lib/widgets/veggie_headline.dart +++ b/veggieseasons/lib/widgets/veggie_headline.dart @@ -67,6 +67,11 @@ class VeggieHeadline extends StatelessWidget { @override Widget build(BuildContext context) { final themeData = CupertinoTheme.of(context); + final String location = GoRouter.of(context) + .routerDelegate + .currentConfiguration + .uri + .toString(); return GestureDetector( onTap: () { @@ -74,7 +79,7 @@ class VeggieHeadline extends StatelessWidget { // so navigate to the absolute route, which can be either // `/favorites/details/${veggie.id}` or `/search/details/${veggie.id}` // see https://github.com/flutter/flutter/issues/108177 - context.go('${GoRouter.of(context).location}/details/${veggie.id}'); + context.go('$location/details/${veggie.id}'); }, child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -93,7 +98,8 @@ class VeggieHeadline extends StatelessWidget { children: [ Row( children: [ - Text(veggie.name, style: Styles.headlineName(themeData)), + Text(veggie.name, + style: Styles.headlineName(themeData)), ..._buildSeasonDots(veggie.seasons), ], ), diff --git a/veggieseasons/pubspec.yaml b/veggieseasons/pubspec.yaml index 7bd4ff4c8..107c8ec07 100644 --- a/veggieseasons/pubspec.yaml +++ b/veggieseasons/pubspec.yaml @@ -1,11 +1,11 @@ name: veggieseasons description: An iOS app that shows the fruits and veggies currently in season. publish_to: none - version: 1.2.0 +resolution: workspace environment: - sdk: '>= <1.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -17,11 +17,11 @@ dependencies: shared_preferences: ^2.0.14 window_size: git: - url: https://github.com/google/flutter-desktop-embedding + url: https://github.com/google/flutter-desktop-embedding.git path: plugins/window_size # TODO: https://github.com/flutter/samples/issues/1838 # go_router ^7.1.0 is breaking the state restoration tests - go_router: 7.0.2 + go_router: ^16.0.0 dev_dependencies: analysis_defaults: diff --git a/web_embedding/element_embedding_demo/pubspec.yaml b/web_embedding/element_embedding_demo/pubspec.yaml index 632dbf101..a3aba7474 100644 --- a/web_embedding/element_embedding_demo/pubspec.yaml +++ b/web_embedding/element_embedding_demo/pubspec.yaml @@ -2,9 +2,10 @@ name: element_embedding_demo description: A small app to be embedded into a HTML element (see web/index.html) publish_to: 'none' version: 1.0.0+1 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -13,7 +14,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter: uses-material-design: true diff --git a/web_embedding/ng-flutter/flutter/pubspec.yaml b/web_embedding/ng-flutter/flutter/pubspec.yaml index a1e338bf5..8fc39bac7 100644 --- a/web_embedding/ng-flutter/flutter/pubspec.yaml +++ b/web_embedding/ng-flutter/flutter/pubspec.yaml @@ -2,9 +2,10 @@ name: ng_companion description: A flutter app with a counter that can be manipulated from JS. publish_to: none version: 1.0.0 +resolution: workspace environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: '^3.5.0' dependencies: flutter: @@ -14,7 +15,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter: uses-material-design: true diff --git a/workspace.md b/workspace.md index 6840f4486..c99ba0228 100644 --- a/workspace.md +++ b/workspace.md @@ -1 +1,6 @@ -Read https://dart.dev/tools/pub/workspaces \ No newline at end of file +You are a Dart developer that maintains packages. Your current task is to incrementally update monorepos to use pub workspaces. + +- Read https://dart.dev/tools/pub/workspaces +- Create a gloabl pubspec.yaml and populate it +- Determine 5 packages in this repository that could easily be migrated to workspaces. +- Migrate those 5 packages. \ No newline at end of file