From 74cd59af462bdd5719533761f2750dbb694303ae Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 26 Nov 2025 13:16:25 -0600 Subject: [PATCH 1/3] Update SDK and dependency constraints as of 3.10 --- pkgs/dart_services/pubspec.yaml | 30 ++++++++++----------- pkgs/dartpad_shared/lib/services.dart | 6 ++--- pkgs/dartpad_shared/pubspec.yaml | 14 +++++----- pkgs/dartpad_ui/lib/app/genai_dialogs.dart | 4 +-- pkgs/dartpad_ui/lib/app/genai_editing.dart | 2 +- pkgs/dartpad_ui/lib/app/simple_widgets.dart | 4 +-- pkgs/dartpad_ui/pubspec.yaml | 26 +++++++++--------- pkgs/samples/lib/brick_breaker.dart | 2 +- pkgs/samples/pubspec.yaml | 12 ++++----- pubspec.yaml | 2 +- 10 files changed, 49 insertions(+), 53 deletions(-) diff --git a/pkgs/dart_services/pubspec.yaml b/pkgs/dart_services/pubspec.yaml index 534278ea6..5f9f04b8f 100644 --- a/pkgs/dart_services/pubspec.yaml +++ b/pkgs/dart_services/pubspec.yaml @@ -5,38 +5,36 @@ publish_to: none resolution: workspace environment: - sdk: ^3.8.0 + sdk: ^3.10.0 dependencies: analysis_server_lib: ^0.2.5 - analyzer: ^7.4.0 + analyzer: ^7.7.1 args: ^2.7.0 - bazel_worker: ^1.1.3 + bazel_worker: ^1.1.4 dartpad_shared: path: ../dartpad_shared encrypt: ^5.0.3 google_cloud_ai_generativelanguage_v1beta: ^0.1.2 google_cloud_gax: ^0.1.2 - http: ^1.3.0 - json_annotation: ^4.9.0 - logging: ^1.2.0 - meta: ^1.15.0 - path: ^1.9.0 + http: ^1.6.0 + logging: ^1.3.0 + meta: ^1.17.0 + path: ^1.9.1 resp_client: ^1.2.0 shelf: ^1.4.2 shelf_gzip: ^4.1.0 shelf_router: ^1.1.4 - shelf_static: ^1.1.0 + shelf_static: ^1.1.3 shelf_web_socket: ^3.0.0 - web_socket_channel: ^3.0.0 + web_socket_channel: ^3.0.3 yaml: ^3.1.3 dev_dependencies: - collection: ^1.19.0 - dart_flutter_team_lints: ^3.2.1 + collection: ^1.19.1 + dart_flutter_team_lints: ^3.5.2 grinder: ^0.9.5 - json_serializable: ^6.9.5 package_config: ^2.2.0 - synchronized: ^3.3.1 - test: ^1.25.9 - test_descriptor: ^2.0.1 + synchronized: ^3.4.0 + test: ^1.26.3 + test_descriptor: ^2.0.2 diff --git a/pkgs/dartpad_shared/lib/services.dart b/pkgs/dartpad_shared/lib/services.dart index faa819c7e..6375f5237 100644 --- a/pkgs/dartpad_shared/lib/services.dart +++ b/pkgs/dartpad_shared/lib/services.dart @@ -214,7 +214,7 @@ class WebsocketServicesClient implements DartPadService { } void _init() { - socket.events.listen((e) async { + socket.events.listen((e) { switch (e) { case TextDataReceived(text: final text): _dispatch(JsonRpcResponse.fromJson(text)); @@ -224,9 +224,7 @@ class WebsocketServicesClient implements DartPadService { break; case CloseReceived(code: final _, reason: final _): // Notify that the server connection has closed. - if (onClosed != null) { - onClosed!(this); - } + onClosed?.call(this); break; } }); diff --git a/pkgs/dartpad_shared/pubspec.yaml b/pkgs/dartpad_shared/pubspec.yaml index 13d314825..e949a1213 100644 --- a/pkgs/dartpad_shared/pubspec.yaml +++ b/pkgs/dartpad_shared/pubspec.yaml @@ -9,16 +9,16 @@ publish_to: none resolution: workspace environment: - sdk: ^3.8.0 + sdk: ^3.10.0 dependencies: collection: ^1.19.1 - http: ^1.3.0 + http: ^1.6.0 json_annotation: ^4.9.0 - meta: ^1.15.0 - web_socket: ^1.0.0 + meta: ^1.17.0 + web_socket: ^1.0.1 dev_dependencies: - build_runner: ^2.4.15 - dart_flutter_team_lints: ^3.2.1 - json_serializable: ^6.9.5 + build_runner: ^2.7.1 + dart_flutter_team_lints: ^3.5.2 + json_serializable: ^6.11.2 diff --git a/pkgs/dartpad_ui/lib/app/genai_dialogs.dart b/pkgs/dartpad_ui/lib/app/genai_dialogs.dart index 2f4040099..f1996072e 100644 --- a/pkgs/dartpad_ui/lib/app/genai_dialogs.dart +++ b/pkgs/dartpad_ui/lib/app/genai_dialogs.dart @@ -49,14 +49,14 @@ Future openCodeGenerationDialog( 'Generate a Flutter login screen with email and password fields, validation, and a submit button', 'tic-tac-toe': 'Generate a Flutter tic-tac-toe game with two players, win detection, and a reset button', - if (lastPrompt != null) 'your last prompt': lastPrompt, + 'your last prompt': ?lastPrompt, }, dartPromptButtons: { 'hello, world': 'Generate a Dart hello world program', 'fibonacci': 'Generate a Dart program that prints the first 10 numbers in the Fibonacci sequence', 'factorial': 'Generate a Dart program that prints the factorial of 5', - if (lastPrompt != null) 'your last prompt': lastPrompt, + 'your last prompt': ?lastPrompt, }, promptTextController: appModel.genAiManager.newCodePromptController, attachments: appModel.genAiManager.newCodeAttachments, diff --git a/pkgs/dartpad_ui/lib/app/genai_editing.dart b/pkgs/dartpad_ui/lib/app/genai_editing.dart index 5c2b51df5..4640765ac 100644 --- a/pkgs/dartpad_ui/lib/app/genai_editing.dart +++ b/pkgs/dartpad_ui/lib/app/genai_editing.dart @@ -86,7 +86,7 @@ class _EditorWithButtonsState extends State { widget.appModel.genAiManager.resetState(); } - void _handleUpdateCodePrompt(BuildContext context) async { + void _handleUpdateCodePrompt(BuildContext context) { widget.appModel.sourceCodeController.textNoScroll = widget.appModel.genAiManager.preGenAiSourceCode.value; widget.appServices.performCompileAndReloadOrRun(); diff --git a/pkgs/dartpad_ui/lib/app/simple_widgets.dart b/pkgs/dartpad_ui/lib/app/simple_widgets.dart index 585110ed3..e618be364 100644 --- a/pkgs/dartpad_ui/lib/app/simple_widgets.dart +++ b/pkgs/dartpad_ui/lib/app/simple_widgets.dart @@ -553,9 +553,9 @@ class SectionWidget extends StatelessWidget { children: [ Row( children: [ - if (title != null) Text(title!, style: subtleText), + if (title case final title?) Text(title, style: subtleText), const Expanded(child: SizedBox(width: defaultSpacing)), - if (actions != null) actions!, + ?actions, ], ), const Divider(), diff --git a/pkgs/dartpad_ui/pubspec.yaml b/pkgs/dartpad_ui/pubspec.yaml index decb0a388..e9aa96f60 100644 --- a/pkgs/dartpad_ui/pubspec.yaml +++ b/pkgs/dartpad_ui/pubspec.yaml @@ -9,31 +9,31 @@ publish_to: none resolution: workspace environment: - sdk: ^3.8.0 + sdk: ^3.10.0 dependencies: - collection: ^1.19.0 + collection: ^1.19.1 dartpad_shared: path: ../dartpad_shared flutter: sdk: flutter - flutter_markdown: ^0.7.2 + flutter_markdown: ^0.7.7+1 flutter_web_plugins: sdk: flutter go_router: ^17.0.0 - google_fonts: ^6.3.0 - http: ^1.3.0 - image_picker: ^1.1.2 + google_fonts: ^6.3.2 + http: ^1.6.0 + image_picker: ^1.2.1 json_annotation: ^4.9.0 mime: ^2.0.0 - pointer_interceptor: ^0.10.1 - pretty_diff_text: ^2.0.0 - provider: ^6.1.2 + pointer_interceptor: ^0.10.1+2 + pretty_diff_text: ^2.1.0 + provider: ^6.1.5+1 split_view: ^3.2.1 - url_launcher: ^6.3.0 + url_launcher: ^6.3.2 vtable: ^0.4.0 - web: ^1.1.0 - web_socket: ^1.0.0 + web: ^1.1.1 + web_socket: ^1.0.1 dev_dependencies: dart_services: @@ -43,7 +43,7 @@ dev_dependencies: sdk: flutter integration_test: sdk: flutter - test: ^1.25.7 + test: ^1.26.3 flutter: uses-material-design: true diff --git a/pkgs/samples/lib/brick_breaker.dart b/pkgs/samples/lib/brick_breaker.dart index 5b40806ae..220d7b9ed 100644 --- a/pkgs/samples/lib/brick_breaker.dart +++ b/pkgs/samples/lib/brick_breaker.dart @@ -88,7 +88,7 @@ class BrickBreaker extends FlameGame double get height => size.y; @override - FutureOr onLoad() async { + void onLoad() { super.onLoad(); camera.viewfinder.anchor = Anchor.topLeft; world.add(PlayArea()); diff --git a/pkgs/samples/pubspec.yaml b/pkgs/samples/pubspec.yaml index bf9653dfa..16d3bab87 100644 --- a/pkgs/samples/pubspec.yaml +++ b/pkgs/samples/pubspec.yaml @@ -9,20 +9,20 @@ publish_to: none resolution: workspace environment: - sdk: ^3.8.0 + sdk: ^3.10.0 dependencies: - flame: ^1.33.0 + flame: ^1.34.0 flutter: sdk: flutter - flutter_markdown: ^0.7.7 - google_generative_ai: ^0.4.6 + flutter_markdown: ^0.7.7+1 + google_generative_ai: ^0.4.7 url_launcher: ^6.3.2 dev_dependencies: - args: ^2.5.0 + args: ^2.7.0 flutter_lints: ^6.0.0 - path: ^1.9.0 + path: ^1.9.1 flutter: uses-material-design: true diff --git a/pubspec.yaml b/pubspec.yaml index c7cf4a15a..6d1563084 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,4 +12,4 @@ workspace: - pkgs/samples environment: - sdk: ^3.8.0 + sdk: ^3.10.0 From 7c75feb0c5cdefa5c7fd5db022eed977551513a5 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 1 Dec 2025 11:34:11 -0600 Subject: [PATCH 2/3] Update constraints again --- pkgs/dartpad_shared/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/dartpad_shared/pubspec.yaml b/pkgs/dartpad_shared/pubspec.yaml index 40cd87c07..bffecf9d5 100644 --- a/pkgs/dartpad_shared/pubspec.yaml +++ b/pkgs/dartpad_shared/pubspec.yaml @@ -19,6 +19,6 @@ dependencies: web_socket: ^1.0.1 dev_dependencies: - build_runner: ^2.10.3 + build_runner: ^2.10.4 dart_flutter_team_lints: ^3.5.2 json_serializable: ^6.11.2 From 3255c2c5e5b0fcd17f0ad952c00df842ac205042 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 1 Dec 2025 13:34:30 -0600 Subject: [PATCH 3/3] Update generated samples file --- pkgs/dartpad_ui/lib/primitives/samples.g.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/dartpad_ui/lib/primitives/samples.g.dart b/pkgs/dartpad_ui/lib/primitives/samples.g.dart index 9240cb4cd..1958c1bc4 100644 --- a/pkgs/dartpad_ui/lib/primitives/samples.g.dart +++ b/pkgs/dartpad_ui/lib/primitives/samples.g.dart @@ -217,7 +217,7 @@ class BrickBreaker extends FlameGame double get height => size.y; @override - FutureOr onLoad() async { + void onLoad() { super.onLoad(); camera.viewfinder.anchor = Anchor.topLeft; world.add(PlayArea());