Skip to content

Commit 4bc942d

Browse files
Upgrade to the latest Flutter SDK (#9244)
1 parent 53b9620 commit 4bc942d

16 files changed

Lines changed: 552 additions & 607 deletions

File tree

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
7575
echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
7676
sudo apt-get update
77-
sudo apt-get install dcm=1.28.0-1 # To avoid errors add `-1` (build number) to the version
77+
sudo apt-get install dcm=1.29.0-1 # To avoid errors add `-1` (build number) to the version
7878
sudo chmod +x /usr/bin/dcm
7979
echo "$(dcm --version)"
8080
- name: Setup Dart SDK

flutter-candidate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
36ea2bdeab611e908967b6fa57659998f600a2cb
1+
a534b2138030409fb79079540d772602dcb7e7df

packages/devtools_app/benchmark/web_bundle_size_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'package:path/path.dart' as path;
1111
import 'package:test/test.dart';
1212

1313
// Benchmark size in kB.
14-
const bundleSizeBenchmark = 5400;
14+
const bundleSizeBenchmark = 5500;
1515
const gzipBundleSizeBenchmark = 1650;
1616

1717
void main() {

packages/devtools_app/lib/src/framework/notifications_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ class _NotificationState extends State<_Notification>
208208
widget.remove(widget);
209209
}
210210
});
211-
controller.reverse();
211+
unawaited(controller.reverse());
212212
});
213213
}
214-
controller.forward();
214+
unawaited(controller.forward());
215215
}
216216

217217
@override

packages/devtools_app/lib/src/screens/inspector/layout_explorer/ui/layout_explorer_widget.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ abstract class LayoutExplorerWidgetState<
167167

168168
void _animateProperties() {
169169
if (_animatedProperties != null) {
170-
changeController.forward();
170+
unawaited(changeController.forward());
171171
}
172172
if (_previousProperties != null) {
173-
entranceController.reverse();
173+
unawaited(entranceController.reverse());
174174
} else {
175-
entranceController.forward();
175+
unawaited(entranceController.forward());
176176
}
177177
}
178178

@@ -214,7 +214,7 @@ abstract class LayoutExplorerWidgetState<
214214
updateHighlighted(nextProperties);
215215
setState(() {
216216
_animatedProperties = computeAnimatedProperties(nextProperties);
217-
changeController.forward(from: 0.0);
217+
unawaited(changeController.forward(from: 0.0));
218218
});
219219
}
220220

@@ -237,7 +237,7 @@ abstract class LayoutExplorerWidgetState<
237237
if (status == AnimationStatus.dismissed) {
238238
setState(() {
239239
_previousProperties = null;
240-
entranceController.forward();
240+
unawaited(entranceController.forward());
241241
});
242242
}
243243
});

packages/devtools_app/lib/src/screens/inspector_shared/inspector_settings_dialog.dart

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -130,25 +130,25 @@ class InspectorDefaultDetailsViewOption extends StatelessWidget {
130130
style: theme.subtleTextStyle,
131131
),
132132
const SizedBox(height: denseSpacing),
133-
Row(
134-
mainAxisSize: MainAxisSize.min,
135-
children: [
136-
Radio<InspectorDetailsViewType>(
137-
value: InspectorDetailsViewType.layoutExplorer,
138-
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
139-
groupValue: selection,
140-
onChanged: _onChanged,
141-
),
142-
Text(InspectorDetailsViewType.layoutExplorer.key),
143-
const SizedBox(width: denseSpacing),
144-
Radio<InspectorDetailsViewType>(
145-
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
146-
value: InspectorDetailsViewType.widgetDetailsTree,
147-
groupValue: selection,
148-
onChanged: _onChanged,
149-
),
150-
Text(InspectorDetailsViewType.widgetDetailsTree.key),
151-
],
133+
RadioGroup(
134+
groupValue: selection,
135+
onChanged: _onChanged,
136+
child: Row(
137+
mainAxisSize: MainAxisSize.min,
138+
children: [
139+
const Radio<InspectorDetailsViewType>(
140+
value: InspectorDetailsViewType.layoutExplorer,
141+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
142+
),
143+
Text(InspectorDetailsViewType.layoutExplorer.key),
144+
const SizedBox(width: denseSpacing),
145+
const Radio<InspectorDetailsViewType>(
146+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
147+
value: InspectorDetailsViewType.widgetDetailsTree,
148+
),
149+
Text(InspectorDetailsViewType.widgetDetailsTree.key),
150+
],
151+
),
152152
),
153153
],
154154
);

packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/layout_explorer_widget.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ abstract class LayoutExplorerWidgetState<
167167

168168
void _animateProperties() {
169169
if (_animatedProperties != null) {
170-
changeController.forward();
170+
unawaited(changeController.forward());
171171
}
172172
if (_previousProperties != null) {
173-
entranceController.reverse();
173+
unawaited(entranceController.reverse());
174174
} else {
175-
entranceController.forward();
175+
unawaited(entranceController.forward());
176176
}
177177
}
178178

@@ -214,7 +214,7 @@ abstract class LayoutExplorerWidgetState<
214214
updateHighlighted(nextProperties);
215215
setState(() {
216216
_animatedProperties = computeAnimatedProperties(nextProperties);
217-
changeController.forward(from: 0.0);
217+
unawaited(changeController.forward(from: 0.0));
218218
});
219219
}
220220

@@ -237,7 +237,7 @@ abstract class LayoutExplorerWidgetState<
237237
if (status == AnimationStatus.dismissed) {
238238
setState(() {
239239
_previousProperties = null;
240-
entranceController.forward();
240+
unawaited(entranceController.forward());
241241
});
242242
}
243243
});

packages/devtools_app/lib/src/screens/memory/shared/widgets/class_filter.dart

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ class _ClassFilterDialogState extends State<ClassFilterDialog> {
101101
final textFieldLeftPadding = scaleByFontFactor(40.0);
102102
void onTypeChanged(ClassFilterType? type) => setState(() => _type = type!);
103103

104-
RadioButton<ClassFilterType> radio(ClassFilterType type, String label) =>
105-
RadioButton<ClassFilterType>(
106-
label: label,
107-
itemValue: type,
108-
groupValue: _type,
109-
onChanged: onTypeChanged,
110-
radioKey: Key(type.toString()),
111-
);
104+
Widget radio(ClassFilterType type, String label) => Row(
105+
children: [
106+
Radio<ClassFilterType>(
107+
value: type,
108+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
109+
key: Key(type.toString()),
110+
),
111+
Expanded(child: Text(label, overflow: TextOverflow.ellipsis)),
112+
],
113+
);
112114

113115
Widget textField(TextEditingController controller) => Padding(
114116
padding: EdgeInsets.only(left: textFieldLeftPadding),
@@ -143,18 +145,22 @@ class _ClassFilterDialogState extends State<ClassFilterDialog> {
143145
);
144146
widget.onChanged(newFilter);
145147
},
146-
child: Column(
147-
mainAxisSize: MainAxisSize.min,
148-
crossAxisAlignment: CrossAxisAlignment.start,
149-
children: [
150-
radio(ClassFilterType.showAll, 'Show all classes'),
151-
const SizedBox(height: defaultSpacing),
152-
radio(ClassFilterType.except, 'Show all classes except:'),
153-
textField(_except),
154-
const SizedBox(height: defaultSpacing),
155-
radio(ClassFilterType.only, 'Show only:'),
156-
textField(_only),
157-
],
148+
child: RadioGroup(
149+
groupValue: _type,
150+
onChanged: onTypeChanged,
151+
child: Column(
152+
mainAxisSize: MainAxisSize.min,
153+
crossAxisAlignment: CrossAxisAlignment.start,
154+
children: [
155+
radio(ClassFilterType.showAll, 'Show all classes'),
156+
const SizedBox(height: defaultSpacing),
157+
radio(ClassFilterType.except, 'Show all classes except:'),
158+
textField(_except),
159+
const SizedBox(height: defaultSpacing),
160+
radio(ClassFilterType.only, 'Show only:'),
161+
textField(_only),
162+
],
163+
),
158164
),
159165
);
160166
}

packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing.dart

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,26 @@ class TraceWidgetBuildsScopeSelector extends StatelessWidget {
346346
Widget build(BuildContext context) {
347347
final theme = Theme.of(context);
348348
final textStyle = enabled ? theme.regularTextStyle : theme.subtleTextStyle;
349-
return Row(
350-
children: [
351-
..._scopeSetting(
352-
TraceWidgetBuildsScope.userCreated,
353-
textStyle: textStyle,
349+
// `Semantics` widget added as a workaround for the bug fixed in
350+
// https://github.com/flutter/flutter/pull/170273. This `Semantics` widget
351+
// can be removed once that PR is landed and DevTools is updated to use a
352+
// version of Flutter with the fix, but it is not an urgent clean up.
353+
return Semantics(
354+
explicitChildNodes: true,
355+
child: RadioGroup<TraceWidgetBuildsScope>(
356+
groupValue: scope,
357+
onChanged: _changeScope,
358+
child: Row(
359+
children: [
360+
..._scopeSetting(
361+
TraceWidgetBuildsScope.userCreated,
362+
textStyle: textStyle,
363+
),
364+
const SizedBox(width: defaultSpacing),
365+
..._scopeSetting(TraceWidgetBuildsScope.all, textStyle: textStyle),
366+
],
354367
),
355-
const SizedBox(width: defaultSpacing),
356-
..._scopeSetting(TraceWidgetBuildsScope.all, textStyle: textStyle),
357-
],
368+
),
358369
);
359370
}
360371

@@ -364,18 +375,17 @@ class TraceWidgetBuildsScopeSelector extends StatelessWidget {
364375
}) {
365376
return [
366377
Radio<TraceWidgetBuildsScope>(
378+
enabled: enabled,
367379
value: type,
368-
groupValue: scope,
369380
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
370-
onChanged: enabled ? _changeScope : null,
371381
),
372382
Text(type.radioDisplay, style: textStyle),
373383
];
374384
}
375385

376386
Future<void> _changeScope(TraceWidgetBuildsScope? type) async {
377-
assert(enabled);
378-
final extension = type!.extensionForScope;
387+
if (type == null) return;
388+
final extension = type.extensionForScope;
379389
final opposite = type.opposite.extensionForScope;
380390
await [
381391
serviceConnection.serviceManager.serviceExtensionManager

packages/devtools_app/lib/src/shared/primitives/collapsible_mixin.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
44

5+
import 'dart:async';
6+
57
import 'package:devtools_app_shared/ui.dart';
68
import 'package:flutter/material.dart';
79

@@ -58,9 +60,9 @@ mixin CollapsibleAnimationMixin<T extends StatefulWidget>
5860
void setExpanded(bool expanded) {
5961
setState(() {
6062
if (expanded) {
61-
expandController.forward();
63+
unawaited(expandController.forward());
6264
} else {
63-
expandController.reverse();
65+
unawaited(expandController.reverse());
6466
}
6567
onExpandChanged(expanded);
6668
});
@@ -70,9 +72,9 @@ mixin CollapsibleAnimationMixin<T extends StatefulWidget>
7072
void didUpdateWidget(Widget oldWidget) {
7173
super.didUpdateWidget(oldWidget as T);
7274
if (isExpanded) {
73-
expandController.forward();
75+
unawaited(expandController.forward());
7476
} else {
75-
expandController.reverse();
77+
unawaited(expandController.reverse());
7678
}
7779
}
7880
}

0 commit comments

Comments
 (0)