From d9e7ef8eb95b3dd74568932a649a1bcc83c0b4a2 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:18:29 -0800 Subject: [PATCH 1/6] Fix failing integration tests --- .../integration_test/run_tests.dart | 8 ----- .../lib/src/shared/ui/filter.dart | 32 +++++++++++++------ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/packages/devtools_app/integration_test/run_tests.dart b/packages/devtools_app/integration_test/run_tests.dart index 099a61a1f6f..8aca87c19d7 100644 --- a/packages/devtools_app/integration_test/run_tests.dart +++ b/packages/devtools_app/integration_test/run_tests.dart @@ -34,16 +34,8 @@ final _disabledTestsForDevice = >{ 'eval_and_browse_test.dart', // https://github.com/flutter/devtools/issues/7425 'export_snapshot_test.dart', - // https://github.com/flutter/devtools/issues/9639 - 'network_screen_test.dart', // https://github.com/flutter/devtools/issues/9641 - 'devtools_extensions_test.dart', - // https://github.com/flutter/devtools/issues/9642 'perfetto_test.dart', - // https://github.com/flutter/devtools/issues/9645 - 'app_test.dart', - // https://github.com/flutter/devtools/issues/9646 - 'service_extensions_test.dart', }, TestAppDevice.flutterChrome.name: { // TODO(https://github.com/flutter/devtools/issues/7145): Figure out why diff --git a/packages/devtools_app/lib/src/shared/ui/filter.dart b/packages/devtools_app/lib/src/shared/ui/filter.dart index 0b6308b0b1c..f4a517fd248 100644 --- a/packages/devtools_app/lib/src/shared/ui/filter.dart +++ b/packages/devtools_app/lib/src/shared/ui/filter.dart @@ -654,7 +654,7 @@ class _StandaloneFilterFieldState extends State> child: ValueListenableBuilder( valueListenable: widget.controller.useRegExp, builder: (context, useRegExp, _) { - return DevToolsClearableTextField( + return DevToolsTextField( hintText: 'Filter', controller: queryTextFieldController, prefixIcon: widget.controller.settingFilters.isNotEmpty @@ -687,18 +687,30 @@ class _StandaloneFilterFieldState extends State> : null, additionalSuffixActions: [ if (widget.controller.queryFilterArgs.isNotEmpty) - InputDecorationSuffixButton.help( + // TODO(elliette): Remove ExcludeSemantics once + // https://github.com/flutter/flutter/issues/161630 is + // fixed and use DevToolsClearableTextField instead. + ExcludeSemantics( + child: InputDecorationSuffixButton.help( + onPressed: () { + showDevToolsDialog( + context: context, + title: 'Filter Syntax', + content: _FilterSyntax( + controller: widget.controller, + filteredItem: widget.filteredItem, + ), + ); + }, + ), + ), + ExcludeSemantics( + child: InputDecorationSuffixButton.clear( onPressed: () { - showDevToolsDialog( - context: context, - title: 'Filter Syntax', - content: _FilterSyntax( - controller: widget.controller, - filteredItem: widget.filteredItem, - ), - ); + queryTextFieldController.clear(); }, ), + ), DevToolsToggleButton( icon: Icons.emergency, message: 'Use regular expressions', From f70ad487f77da28b66153b15dac657a0a50456e1 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:19:45 -0800 Subject: [PATCH 2/6] Add DevToolsTextField --- .../lib/src/ui/text_field.dart | 68 +++++++++++++++---- pubspec.lock | 16 ++--- 2 files changed, 64 insertions(+), 20 deletions(-) diff --git a/packages/devtools_app_shared/lib/src/ui/text_field.dart b/packages/devtools_app_shared/lib/src/ui/text_field.dart index d6cb27db59d..eda5451d8ba 100644 --- a/packages/devtools_app_shared/lib/src/ui/text_field.dart +++ b/packages/devtools_app_shared/lib/src/ui/text_field.dart @@ -7,9 +7,9 @@ import 'package:flutter/material.dart'; import 'common.dart'; import 'theme/theme.dart'; -/// A DevTools-styled text field with a suffix action to clear the search field. -final class DevToolsClearableTextField extends StatelessWidget { - DevToolsClearableTextField({ +/// A DevTools-styled text field. +final class DevToolsTextField extends StatelessWidget { + DevToolsTextField({ super.key, TextEditingController? controller, this.labelText, @@ -78,15 +78,7 @@ final class DevToolsClearableTextField extends StatelessWidget { height: inputDecorationElementHeight, child: Row( mainAxisSize: MainAxisSize.min, - children: [ - ...additionalSuffixActions, - InputDecorationSuffixButton.clear( - onPressed: () { - controller.clear(); - onChanged?.call(''); - }, - ), - ], + children: additionalSuffixActions, ), ), ), @@ -95,6 +87,58 @@ final class DevToolsClearableTextField extends StatelessWidget { } } +/// A DevTools-styled text field with a suffix action to clear the search field. +final class DevToolsClearableTextField extends StatelessWidget { + DevToolsClearableTextField({ + super.key, + TextEditingController? controller, + this.labelText, + this.hintText, + this.prefixIcon, + this.additionalSuffixActions = const [], + this.onChanged, + this.onSubmitted, + this.autofocus = false, + this.enabled, + this.roundedBorder = false, + }) : controller = controller ?? TextEditingController(); + + final TextEditingController controller; + final String? hintText; + final Widget? prefixIcon; + final List additionalSuffixActions; + final String? labelText; + final void Function(String)? onChanged; + final void Function(String)? onSubmitted; + final bool autofocus; + final bool? enabled; + final bool roundedBorder; + + @override + Widget build(BuildContext context) { + return DevToolsTextField( + controller: controller, + labelText: labelText, + hintText: hintText, + prefixIcon: prefixIcon, + additionalSuffixActions: [ + ...additionalSuffixActions, + InputDecorationSuffixButton.clear( + onPressed: () { + controller.clear(); + onChanged?.call(''); + }, + ), + ], + onChanged: onChanged, + onSubmitted: onSubmitted, + autofocus: autofocus, + enabled: enabled, + roundedBorder: roundedBorder, + ); + } +} + /// A DevTools-styled icon action button intended to be used as an /// [InputDecoration.suffix] widget. final class InputDecorationSuffixButton extends StatelessWidget { diff --git a/pubspec.lock b/pubspec.lock index 7127d25f17d..0483804f4b2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -546,10 +546,10 @@ packages: dependency: transitive description: name: meta - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" mime: dependency: transitive description: @@ -854,26 +854,26 @@ packages: dependency: transitive description: name: test - sha256: "77cc98ea27006c84e71a7356cf3daf9ddbde2d91d84f77dbfe64cf0e4d9611ae" + sha256: "54c516bbb7cee2754d327ad4fca637f78abfc3cbcc5ace83b3eda117e42cd71a" url: "https://pub.dev" source: hosted - version: "1.28.0" + version: "1.29.0" test_api: dependency: transitive description: name: test_api - sha256: "19a78f63e83d3a61f00826d09bc2f60e191bf3504183c001262be6ac75589fb8" + sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" url: "https://pub.dev" source: hosted - version: "0.7.8" + version: "0.7.9" test_core: dependency: transitive description: name: test_core - sha256: f1072617a6657e5fc09662e721307f7fb009b4ed89b19f47175d11d5254a62d4 + sha256: "394f07d21f0f2255ec9e3989f21e54d3c7dc0e6e9dbce160e5a9c1a6be0e2943" url: "https://pub.dev" source: hosted - version: "0.6.14" + version: "0.6.15" typed_data: dependency: transitive description: From da7ae37f73cf0854b94a41a6db3e6081fa37db39 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:02:17 -0800 Subject: [PATCH 3/6] One more error --- .../project_root_selection/root_selector.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/devtools_app/lib/src/screens/deep_link_validation/project_root_selection/root_selector.dart b/packages/devtools_app/lib/src/screens/deep_link_validation/project_root_selection/root_selector.dart index dc76fb8e7ac..891ebc15cf0 100644 --- a/packages/devtools_app/lib/src/screens/deep_link_validation/project_root_selection/root_selector.dart +++ b/packages/devtools_app/lib/src/screens/deep_link_validation/project_root_selection/root_selector.dart @@ -55,7 +55,7 @@ class _ProjectRootTextFieldState extends State child: Container( height: defaultTextFieldHeight, padding: const EdgeInsets.symmetric(horizontal: defaultSpacing), - child: DevToolsClearableTextField( + child: DevToolsTextField( controller: controller, enabled: widget.enabled, onSubmitted: (String path) { @@ -63,6 +63,18 @@ class _ProjectRootTextFieldState extends State }, labelText: 'Path to Flutter project', roundedBorder: true, + additionalSuffixActions: [ + // TODO(elliette): Remove ExcludeSemantics once + // https://github.com/flutter/flutter/issues/161630 is + // fixed and use DevToolsClearableTextField instead. + ExcludeSemantics( + child: InputDecorationSuffixButton.clear( + onPressed: () { + controller.clear(); + }, + ), + ), + ], ), ), ); From 5c0433692eb8eb445406d93f339afe3b36eaf17a Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Wed, 11 Feb 2026 15:32:05 -0800 Subject: [PATCH 4/6] Commit in root --- packages/devtools_app_shared/CHANGELOG.md | 3 +++ packages/devtools_app_shared/pubspec.yaml | 2 +- pubspec.lock | 16 ++++++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/devtools_app_shared/CHANGELOG.md b/packages/devtools_app_shared/CHANGELOG.md index d09686f5bb6..9a7873ddf0e 100644 --- a/packages/devtools_app_shared/CHANGELOG.md +++ b/packages/devtools_app_shared/CHANGELOG.md @@ -3,6 +3,9 @@ Copyright 2025 The Flutter Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. --> +## 0.5.1 (not released) +* Add DevTools-styled text field `DevToolsTextField`. + ## 0.5.0 * **Breaking change:** remove `scaleByFontFactor`. * **Breaking change:** remove `IdeTheme.fontSize` and `IdeTheme.fontSizeFactor`. diff --git a/packages/devtools_app_shared/pubspec.yaml b/packages/devtools_app_shared/pubspec.yaml index 4e1b0289b40..5e1fd8f3131 100644 --- a/packages/devtools_app_shared/pubspec.yaml +++ b/packages/devtools_app_shared/pubspec.yaml @@ -3,7 +3,7 @@ # found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. name: devtools_app_shared description: Package of Dart & Flutter structures shared between devtools_app and devtools extensions. -version: 0.5.0 +version: 0.5.1 repository: https://github.com/flutter/devtools/tree/master/packages/devtools_app_shared environment: diff --git a/pubspec.lock b/pubspec.lock index 0483804f4b2..7127d25f17d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -546,10 +546,10 @@ packages: dependency: transitive description: name: meta - sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.17.0" mime: dependency: transitive description: @@ -854,26 +854,26 @@ packages: dependency: transitive description: name: test - sha256: "54c516bbb7cee2754d327ad4fca637f78abfc3cbcc5ace83b3eda117e42cd71a" + sha256: "77cc98ea27006c84e71a7356cf3daf9ddbde2d91d84f77dbfe64cf0e4d9611ae" url: "https://pub.dev" source: hosted - version: "1.29.0" + version: "1.28.0" test_api: dependency: transitive description: name: test_api - sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" + sha256: "19a78f63e83d3a61f00826d09bc2f60e191bf3504183c001262be6ac75589fb8" url: "https://pub.dev" source: hosted - version: "0.7.9" + version: "0.7.8" test_core: dependency: transitive description: name: test_core - sha256: "394f07d21f0f2255ec9e3989f21e54d3c7dc0e6e9dbce160e5a9c1a6be0e2943" + sha256: f1072617a6657e5fc09662e721307f7fb009b4ed89b19f47175d11d5254a62d4 url: "https://pub.dev" source: hosted - version: "0.6.15" + version: "0.6.14" typed_data: dependency: transitive description: From 372a16db80904a9c587ca6aae7e6acd26f585711 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:08:26 -0800 Subject: [PATCH 5/6] Update Flutter candidate --- flutter-candidate.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter-candidate.txt b/flutter-candidate.txt index f32407a8bbe..1efe0e0ca86 100644 --- a/flutter-candidate.txt +++ b/flutter-candidate.txt @@ -1 +1 @@ -5f49837cddf55149ed9af642a80a2bb45b0149ec +8034db0bd38b1c682146474cc5986e2e00dad96f From b2a7f2702b2bbb7dcde9ef56c09a7c224ac82804 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:32:12 -0800 Subject: [PATCH 6/6] Move lint ignore --- .../lib/src/shared/table/table_controller.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/devtools_app/lib/src/shared/table/table_controller.dart b/packages/devtools_app/lib/src/shared/table/table_controller.dart index c7945e8dcdf..d3f2d036826 100644 --- a/packages/devtools_app/lib/src/shared/table/table_controller.dart +++ b/packages/devtools_app/lib/src/shared/table/table_controller.dart @@ -397,16 +397,16 @@ class TableUiState { } } -// Ignoring the 'avoid_classes_with_only_static_members' lint because the static -// members here allow us to add asserts that guarantee unique keys for tables -// across DevTools. -// ignore: avoid_classes_with_only_static_members /// Stores the [TableUiState] for each table, keyed on a unique [String]. /// /// This store will remain alive for the entire life of the DevTools instance. /// This allows us to cache the [TableUiState] for tables without having to /// keep table [State] classes or table controller classes alive. @visibleForTesting +// Note: Ignoring the 'avoid_classes_with_only_static_members' lint because the +// static members here allow us to add asserts that guarantee unique keys for +// tables across DevTools. +// ignore: avoid_classes_with_only_static_members, see reason above. abstract class TableUiStateStore { static final _tableUiStateStore = {};