Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
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
sudo apt-get update
sudo apt-get install dcm=1.28.0-1 # To avoid errors add `-1` (build number) to the version
sudo apt-get install dcm=1.29.0-1 # To avoid errors add `-1` (build number) to the version
sudo chmod +x /usr/bin/dcm
echo "$(dcm --version)"
- name: Setup Dart SDK
Expand Down
2 changes: 1 addition & 1 deletion flutter-candidate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
36ea2bdeab611e908967b6fa57659998f600a2cb
a534b2138030409fb79079540d772602dcb7e7df
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:path/path.dart' as path;
import 'package:test/test.dart';

// Benchmark size in kB.
const bundleSizeBenchmark = 5400;
const bundleSizeBenchmark = 5500;
const gzipBundleSizeBenchmark = 1650;

void main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ class _NotificationState extends State<_Notification>
widget.remove(widget);
}
});
controller.reverse();
unawaited(controller.reverse());
});
}
controller.forward();
unawaited(controller.forward());
}

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ abstract class LayoutExplorerWidgetState<

void _animateProperties() {
if (_animatedProperties != null) {
changeController.forward();
unawaited(changeController.forward());
}
if (_previousProperties != null) {
entranceController.reverse();
unawaited(entranceController.reverse());
} else {
entranceController.forward();
unawaited(entranceController.forward());
}
}

Expand Down Expand Up @@ -214,7 +214,7 @@ abstract class LayoutExplorerWidgetState<
updateHighlighted(nextProperties);
setState(() {
_animatedProperties = computeAnimatedProperties(nextProperties);
changeController.forward(from: 0.0);
unawaited(changeController.forward(from: 0.0));
});
}

Expand All @@ -237,7 +237,7 @@ abstract class LayoutExplorerWidgetState<
if (status == AnimationStatus.dismissed) {
setState(() {
_previousProperties = null;
entranceController.forward();
unawaited(entranceController.forward());
});
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,25 +130,25 @@ class InspectorDefaultDetailsViewOption extends StatelessWidget {
style: theme.subtleTextStyle,
),
const SizedBox(height: denseSpacing),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Radio<InspectorDetailsViewType>(
value: InspectorDetailsViewType.layoutExplorer,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
groupValue: selection,
onChanged: _onChanged,
),
Text(InspectorDetailsViewType.layoutExplorer.key),
const SizedBox(width: denseSpacing),
Radio<InspectorDetailsViewType>(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
value: InspectorDetailsViewType.widgetDetailsTree,
groupValue: selection,
onChanged: _onChanged,
),
Text(InspectorDetailsViewType.widgetDetailsTree.key),
],
RadioGroup(
groupValue: selection,
onChanged: _onChanged,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Radio<InspectorDetailsViewType>(
value: InspectorDetailsViewType.layoutExplorer,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
Text(InspectorDetailsViewType.layoutExplorer.key),
const SizedBox(width: denseSpacing),
const Radio<InspectorDetailsViewType>(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
value: InspectorDetailsViewType.widgetDetailsTree,
),
Text(InspectorDetailsViewType.widgetDetailsTree.key),
],
),
),
],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ abstract class LayoutExplorerWidgetState<

void _animateProperties() {
if (_animatedProperties != null) {
changeController.forward();
unawaited(changeController.forward());
}
if (_previousProperties != null) {
entranceController.reverse();
unawaited(entranceController.reverse());
} else {
entranceController.forward();
unawaited(entranceController.forward());
}
}

Expand Down Expand Up @@ -214,7 +214,7 @@ abstract class LayoutExplorerWidgetState<
updateHighlighted(nextProperties);
setState(() {
_animatedProperties = computeAnimatedProperties(nextProperties);
changeController.forward(from: 0.0);
unawaited(changeController.forward(from: 0.0));
});
}

Expand All @@ -237,7 +237,7 @@ abstract class LayoutExplorerWidgetState<
if (status == AnimationStatus.dismissed) {
setState(() {
_previousProperties = null;
entranceController.forward();
unawaited(entranceController.forward());
});
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,16 @@ class _ClassFilterDialogState extends State<ClassFilterDialog> {
final textFieldLeftPadding = scaleByFontFactor(40.0);
void onTypeChanged(ClassFilterType? type) => setState(() => _type = type!);

RadioButton<ClassFilterType> radio(ClassFilterType type, String label) =>
RadioButton<ClassFilterType>(
label: label,
itemValue: type,
groupValue: _type,
onChanged: onTypeChanged,
radioKey: Key(type.toString()),
);
Widget radio(ClassFilterType type, String label) => Row(
children: [
Radio<ClassFilterType>(
value: type,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
key: Key(type.toString()),
),
Expanded(child: Text(label, overflow: TextOverflow.ellipsis)),
],
);

Widget textField(TextEditingController controller) => Padding(
padding: EdgeInsets.only(left: textFieldLeftPadding),
Expand Down Expand Up @@ -143,18 +145,22 @@ class _ClassFilterDialogState extends State<ClassFilterDialog> {
);
widget.onChanged(newFilter);
},
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
radio(ClassFilterType.showAll, 'Show all classes'),
const SizedBox(height: defaultSpacing),
radio(ClassFilterType.except, 'Show all classes except:'),
textField(_except),
const SizedBox(height: defaultSpacing),
radio(ClassFilterType.only, 'Show only:'),
textField(_only),
],
child: RadioGroup(
groupValue: _type,
onChanged: onTypeChanged,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
radio(ClassFilterType.showAll, 'Show all classes'),
const SizedBox(height: defaultSpacing),
radio(ClassFilterType.except, 'Show all classes except:'),
textField(_except),
const SizedBox(height: defaultSpacing),
radio(ClassFilterType.only, 'Show only:'),
textField(_only),
],
),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,26 @@ class TraceWidgetBuildsScopeSelector extends StatelessWidget {
Widget build(BuildContext context) {
final theme = Theme.of(context);
final textStyle = enabled ? theme.regularTextStyle : theme.subtleTextStyle;
return Row(
children: [
..._scopeSetting(
TraceWidgetBuildsScope.userCreated,
textStyle: textStyle,
// `Semantics` widget added as a workaround for the bug fixed in
// https://github.com/flutter/flutter/pull/170273. This `Semantics` widget
// can be removed once that PR is landed and DevTools is updated to use a
// version of Flutter with the fix, but it is not an urgent clean up.
return Semantics(
explicitChildNodes: true,
child: RadioGroup<TraceWidgetBuildsScope>(
groupValue: scope,
onChanged: _changeScope,
child: Row(
children: [
..._scopeSetting(
TraceWidgetBuildsScope.userCreated,
textStyle: textStyle,
),
const SizedBox(width: defaultSpacing),
..._scopeSetting(TraceWidgetBuildsScope.all, textStyle: textStyle),
],
),
const SizedBox(width: defaultSpacing),
..._scopeSetting(TraceWidgetBuildsScope.all, textStyle: textStyle),
],
),
);
}

Expand All @@ -364,18 +375,17 @@ class TraceWidgetBuildsScopeSelector extends StatelessWidget {
}) {
return [
Radio<TraceWidgetBuildsScope>(
enabled: enabled,
value: type,
groupValue: scope,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: enabled ? _changeScope : null,
),
Text(type.radioDisplay, style: textStyle),
];
}

Future<void> _changeScope(TraceWidgetBuildsScope? type) async {
assert(enabled);
final extension = type!.extensionForScope;
if (type == null) return;
final extension = type.extensionForScope;
final opposite = type.opposite.extensionForScope;
await [
serviceConnection.serviceManager.serviceExtensionManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// 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.

import 'dart:async';

import 'package:devtools_app_shared/ui.dart';
import 'package:flutter/material.dart';

Expand Down Expand Up @@ -58,9 +60,9 @@ mixin CollapsibleAnimationMixin<T extends StatefulWidget>
void setExpanded(bool expanded) {
setState(() {
if (expanded) {
expandController.forward();
unawaited(expandController.forward());
} else {
expandController.reverse();
unawaited(expandController.reverse());
}
onExpandChanged(expanded);
});
Expand All @@ -70,9 +72,9 @@ mixin CollapsibleAnimationMixin<T extends StatefulWidget>
void didUpdateWidget(Widget oldWidget) {
super.didUpdateWidget(oldWidget as T);
if (isExpanded) {
expandController.forward();
unawaited(expandController.forward());
} else {
expandController.reverse();
unawaited(expandController.reverse());
}
}
}
33 changes: 0 additions & 33 deletions packages/devtools_app/lib/src/shared/ui/common_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2091,39 +2091,6 @@ class DownloadButton extends StatelessWidget {
}
}

class RadioButton<T> extends StatelessWidget {
const RadioButton({
super.key,
required this.label,
required this.itemValue,
required this.groupValue,
this.onChanged,
this.radioKey,
});

final String label;
final T itemValue;
final T groupValue;
final void Function(T?)? onChanged;
final Key? radioKey;

@override
Widget build(BuildContext context) {
return Row(
children: [
Radio<T>(
value: itemValue,
groupValue: groupValue,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: onChanged,
key: radioKey,
),
Expanded(child: Text(label, overflow: TextOverflow.ellipsis)),
],
);
}
}

class ContextMenuButton extends StatelessWidget {
ContextMenuButton({
super.key,
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools_app/lib/src/shared/ui/side_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class SidePanelViewerState extends State<SidePanelViewer>
setState(() {
isVisible = widget.controller.isVisible.value;
if (isVisible) {
visibilityController.forward();
unawaited(visibilityController.forward());
} else {
visibilityController.reverse();
unawaited(visibilityController.reverse());
}
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// 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.

import 'dart:async';

import 'package:devtools_app_shared/ui.dart';
import 'package:devtools_app_shared/utils.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -548,9 +550,9 @@ class _ExpandableWidgetDocumentationState
setState(() {
_isExpanded = !_isExpanded;
if (_isExpanded) {
_expandAnimationController.forward();
unawaited(_expandAnimationController.forward());
} else {
_expandAnimationController.reverse();
unawaited(_expandAnimationController.reverse());
}
});
}
Expand Down
Loading