diff --git a/flutter-candidate.txt b/flutter-candidate.txt index 9a66865d80c..4eec4d6c3ae 100644 --- a/flutter-candidate.txt +++ b/flutter-candidate.txt @@ -1 +1 @@ -3e4f1cdf494e09304587f648456f2560d3628fe9 +aea84342eb861832bbf8578de432c4da5a074136 diff --git a/packages/devtools_app/benchmark/devtools_benchmarks_test.dart b/packages/devtools_app/benchmark/devtools_benchmarks_test.dart index 58a0b59733e..a6c64226d6f 100644 --- a/packages/devtools_app/benchmark/devtools_benchmarks_test.dart +++ b/packages/devtools_app/benchmark/devtools_benchmarks_test.dart @@ -40,6 +40,10 @@ void main() { await _runBenchmarks(useWasm: useWasm); }, timeout: const Timeout(Duration(minutes: 10)), + // TODO(https://github.com/dart-lang/sdk/issues/56664): unskip the wasm + // benchmarks once this issue is resolved and we can bump DevTools to a + // version of Flutter that includes the fix. + skip: useWasm, ); } diff --git a/packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart b/packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart index c192606e467..0e45428602f 100644 --- a/packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart +++ b/packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart @@ -565,7 +565,8 @@ class _FloatingDebuggerControlsState extends State @override Widget build(BuildContext context) { - final colorScheme = Theme.of(context).colorScheme; + final theme = Theme.of(context); + final colorScheme = theme.colorScheme; return AnimatedOpacity( opacity: _isPaused ? 1.0 : 0.0, duration: longDuration, @@ -580,10 +581,7 @@ class _FloatingDebuggerControlsState extends State color: colorScheme.warningContainer, height: controlHeight, child: OutlinedRowGroup( - // Default focus color for the light theme - since the background - // color of the controls [devtoolsWarning] is the same for both - // themes, we will use the same border color. - borderColor: Colors.black.withOpacity(0.12), + borderColor: theme.focusColor, children: [ Container( height: defaultButtonHeight, diff --git a/packages/devtools_app/lib/src/screens/inspector/layout_explorer/ui/utils.dart b/packages/devtools_app/lib/src/screens/inspector/layout_explorer/ui/utils.dart index fe5284f596a..c8bcc4de9e6 100644 --- a/packages/devtools_app/lib/src/screens/inspector/layout_explorer/ui/utils.dart +++ b/packages/devtools_app/lib/src/screens/inspector/layout_explorer/ui/utils.dart @@ -167,7 +167,7 @@ class WidgetVisualizer extends StatelessWidget { boxShadow: isSelected ? [ BoxShadow( - color: Colors.black.withOpacity(0.5), + color: Colors.black.withAlpha(255 ~/ 2), blurRadius: 20, ), ] diff --git a/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/utils.dart b/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/utils.dart index ce472ac1b25..c55b972ac29 100644 --- a/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/utils.dart +++ b/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/utils.dart @@ -168,7 +168,7 @@ class WidgetVisualizer extends StatelessWidget { boxShadow: isSelected ? [ BoxShadow( - color: Colors.black.withOpacity(0.5), + color: Colors.black.withAlpha(255 ~/ 2), blurRadius: 10, ), ] diff --git a/packages/devtools_app/lib/src/shared/common_widgets.dart b/packages/devtools_app/lib/src/shared/common_widgets.dart index 87da35e202d..8866f8fc4bc 100644 --- a/packages/devtools_app/lib/src/shared/common_widgets.dart +++ b/packages/devtools_app/lib/src/shared/common_widgets.dart @@ -893,11 +893,11 @@ extension ColorExtension on Color { percent = 1.0 - percent; final c = this; - return Color.fromARGB( - c.alpha, - (c.red * percent).round(), - (c.green * percent).round(), - (c.blue * percent).round(), + return Color.from( + alpha: c.a, + red: c.r * percent, + green: c.g * percent, + blue: c.b * percent, ); } @@ -906,11 +906,11 @@ extension ColorExtension on Color { assert(0.0 <= percent && percent <= 1.0); final c = this; - return Color.fromARGB( - c.alpha, - c.red + ((255 - c.red) * percent).round(), - c.green + ((255 - c.green) * percent).round(), - c.blue + ((255 - c.blue) * percent).round(), + return Color.from( + alpha: c.a, + red: c.r + ((1.0 - c.r) * percent), + green: c.g + ((1.0 - c.g) * percent), + blue: c.b + ((1.0 - c.b) * percent), ); } } diff --git a/packages/devtools_app/test/shared/table_test.dart b/packages/devtools_app/test/shared/table_test.dart index a528467fccd..adef8c6f0f0 100644 --- a/packages/devtools_app/test/shared/table_test.dart +++ b/packages/devtools_app/test/shared/table_test.dart @@ -1639,10 +1639,11 @@ void main() { final snapFinder = find.byKey(const Key('Snap')); final crackleFinder = find.byKey(const Key('Crackle')); - // Expected values returned through accessing Color.value property. - const color1Value = 4294111476; - const color2Value = 4294967295; - const rowSelectedColorValue = 4294967295; + // Expected ARGB color values. + const color1Value = + '(a: 1.0, r: 0.9490196078431372, g: 0.9411764705882353, b: 0.9568627450980393)'; + const color2Value = '(a: 1.0, r: 1.0, g: 1.0, b: 1.0)'; + const rowSelectedColorValue = '(a: 1.0, r: 1.0, g: 1.0, b: 1.0)'; await tester.pumpWidget(wrap(table)); await tester.pumpAndSettle(); @@ -1661,12 +1662,12 @@ void main() { final TableRow snapRow = tester.widget(snapFinder); TableRow crackleRow = tester.widget(crackleFinder); - expect(fooRow.backgroundColor!.value, color1Value); - expect(barRow.backgroundColor!.value, color2Value); - expect(bazRow.backgroundColor!.value, color1Value); - expect(quxRow.backgroundColor!.value, color2Value); - expect(snapRow.backgroundColor!.value, color1Value); - expect(crackleRow.backgroundColor!.value, color2Value); + expect(fooRow.backgroundColor!.toArgbString(), color1Value); + expect(barRow.backgroundColor!.toArgbString(), color2Value); + expect(bazRow.backgroundColor!.toArgbString(), color1Value); + expect(quxRow.backgroundColor!.toArgbString(), color2Value); + expect(snapRow.backgroundColor!.toArgbString(), color1Value); + expect(crackleRow.backgroundColor!.toArgbString(), color2Value); await tester.tap(barFinder); await tester.pumpAndSettle(); @@ -1680,12 +1681,12 @@ void main() { barRow = tester.widget(barFinder); crackleRow = tester.widget(crackleFinder); - expect(fooRow.backgroundColor!.value, color1Value); + expect(fooRow.backgroundColor!.toArgbString(), color1Value); // [barRow] has the rowSelected color after being tapped. - expect(barRow.backgroundColor!.value, rowSelectedColorValue); + expect(barRow.backgroundColor!.toArgbString(), rowSelectedColorValue); // [crackleRow] has a different background color after collapsing previous // row (Bar). - expect(crackleRow.backgroundColor!.value, color1Value); + expect(crackleRow.backgroundColor!.toArgbString(), color1Value); }, ); @@ -1837,3 +1838,9 @@ class _VeryWideMinWidthColumn extends ColumnData { @override bool get supportsSorting => false; } + +extension on Color { + String toArgbString() { + return '(a: $a, r: $r, g: $g, b: $b)'; + } +} diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_errors_2_error_selected.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_errors_2_error_selected.png index d2523f5595d..b60547767b6 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_errors_2_error_selected.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_errors_2_error_selected.png differ diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_select_center.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_select_center.png index 4f6b65462af..99bcf67bdec 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_select_center.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_select_center.png differ diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_errors_2_error_selected.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_errors_2_error_selected.png index 0d3ebe296b2..72ec4c26c6b 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_errors_2_error_selected.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_errors_2_error_selected.png differ diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected.png index 301f5ec35d7..fc704214a87 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected.png differ diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected_from_search.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected_from_search.png index 301f5ec35d7..fc704214a87 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected_from_search.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_hideable_widget_selected_from_search.png differ diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_collapsed.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_collapsed.png index ce6c727ad83..2abd545bad9 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_collapsed.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_collapsed.png differ diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_hidden.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_hidden.png index 9ce1dd7fd79..c44a15ae2c9 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_hidden.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_implementation_widgets_hidden.png differ diff --git a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_select_center.png b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_select_center.png index 366ece1566e..0b71c092397 100644 Binary files a/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_select_center.png and b/packages/devtools_app/test/test_infra/goldens/integration_inspector_v2_select_center.png differ diff --git a/packages/devtools_app_shared/lib/src/ui/theme/theme.dart b/packages/devtools_app_shared/lib/src/ui/theme/theme.dart index 234b7a365bc..1dbe07d8779 100644 --- a/packages/devtools_app_shared/lib/src/ui/theme/theme.dart +++ b/packages/devtools_app_shared/lib/src/ui/theme/theme.dart @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// TODO(kenz): remove once min flutter version of devtools_app_shared >= 3.25 +// ignore_for_file: deprecated_member_use, analysis performed with newer flutter version than min sdk + import 'package:flutter/material.dart'; import '../ui_utils.dart'; diff --git a/packages/devtools_app_shared/lib/src/utils/utils.dart b/packages/devtools_app_shared/lib/src/utils/utils.dart index c4c21f664df..3122a7ee152 100644 --- a/packages/devtools_app_shared/lib/src/utils/utils.dart +++ b/packages/devtools_app_shared/lib/src/utils/utils.dart @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// TODO(kenz): remove once min flutter version of devtools_app_shared >= 3.25 +// ignore_for_file: deprecated_member_use, analysis performed with newer flutter version than min sdk + import 'dart:async'; import 'dart:math';