Skip to content

Commit 6a54059

Browse files
authored
Make MultiChildRenderObjectWidget const (#119195)
1 parent 9b3b9cf commit 6a54059

37 files changed

+415
-417
lines changed

dev/benchmarks/platform_views_layout/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class PlatformViewLayout extends StatelessWidget {
5555
child: Material(
5656
elevation: (index % 5 + 1).toDouble(),
5757
color: Colors.white,
58-
child: Stack(
59-
children: const <Widget> [
58+
child: const Stack(
59+
children: <Widget> [
6060
DummyPlatformView(),
6161
RotationContainer(),
6262
],

dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class PlatformViewLayout extends StatelessWidget {
5959
child: Material(
6060
elevation: (index % 5 + 1).toDouble(),
6161
color: Colors.white,
62-
child: Stack(
63-
children: const <Widget> [
62+
child: const Stack(
63+
children: <Widget> [
6464
DummyPlatformView(),
6565
RotationContainer(),
6666
],

dev/integration_tests/android_semantics_testing/lib/src/tests/popup_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ class _PopupControlsPageState extends State<PopupControlsPage> {
7777
return AlertDialog(
7878
key: const ValueKey<String>(alertKeyValue),
7979
title: const Text('Title text', key: ValueKey<String>('$alertKeyValue.Title')),
80-
content: SingleChildScrollView(
80+
content: const SingleChildScrollView(
8181
child: ListBody(
82-
children: const <Widget>[
82+
children: <Widget>[
8383
Text('Body text line 1.', key: ValueKey<String>('$alertKeyValue.Body1')),
8484
Text('Body text line 2.', key: ValueKey<String>('$alertKeyValue.Body2')),
8585
],

packages/flutter/lib/src/cupertino/dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1763,7 +1763,7 @@ class CupertinoDialogAction extends StatelessWidget {
17631763
//
17641764
// See [_RenderCupertinoDialogActions] for specific layout policy details.
17651765
class _CupertinoDialogActionsRenderWidget extends MultiChildRenderObjectWidget {
1766-
_CupertinoDialogActionsRenderWidget({
1766+
const _CupertinoDialogActionsRenderWidget({
17671767
required List<Widget> actionButtons,
17681768
double dividerThickness = 0.0,
17691769
bool hasCancelButton = false,

packages/flutter/lib/src/cupertino/segmented_control.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class _SegmentedControlState<T extends Object> extends State<CupertinoSegmentedC
405405
}
406406

407407
class _SegmentedControlRenderWidget<T> extends MultiChildRenderObjectWidget {
408-
_SegmentedControlRenderWidget({
408+
const _SegmentedControlRenderWidget({
409409
super.key,
410410
super.children,
411411
required this.selectedIndex,

packages/flutter/lib/src/cupertino/sliding_segmented_control.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ class _SegmentedControlState<T> extends State<CupertinoSlidingSegmentedControl<T
711711
}
712712

713713
class _SegmentedControlRenderWidget<T> extends MultiChildRenderObjectWidget {
714-
_SegmentedControlRenderWidget({
714+
const _SegmentedControlRenderWidget({
715715
super.key,
716716
super.children,
717717
required this.highlightedIndex,

packages/flutter/lib/src/material/button_bar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class ButtonBar extends StatelessWidget {
233233
class _ButtonBarRow extends Flex {
234234
/// Creates a button bar that attempts to display in a row, but displays in
235235
/// a column if there is insufficient horizontal space.
236-
_ButtonBarRow({
236+
const _ButtonBarRow({
237237
required super.children,
238238
super.mainAxisSize,
239239
super.mainAxisAlignment,

packages/flutter/lib/src/material/dialog.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ class Dialog extends StatelessWidget {
302302
/// builder: (BuildContext context) {
303303
/// return AlertDialog(
304304
/// title: const Text('AlertDialog Title'),
305-
/// content: SingleChildScrollView(
305+
/// content: const SingleChildScrollView(
306306
/// child: ListBody(
307-
/// children: const <Widget>[
307+
/// children: <Widget>[
308308
/// Text('This is a demo alert dialog.'),
309309
/// Text('Would you like to approve of this message?'),
310310
/// ],

packages/flutter/lib/src/material/dropdown_menu.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ class _ArrowDownIntent extends Intent {
605605
}
606606

607607
class _DropdownMenuBody extends MultiChildRenderObjectWidget {
608-
_DropdownMenuBody({
608+
const _DropdownMenuBody({
609609
super.key,
610610
super.children,
611611
this.width,

packages/flutter/lib/src/material/mergeable_material.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ class _MergeableMaterialSliceKey extends GlobalKey {
655655
}
656656

657657
class _MergeableMaterialListBody extends ListBody {
658-
_MergeableMaterialListBody({
658+
const _MergeableMaterialListBody({
659659
required super.children,
660660
super.mainAxis,
661661
required this.items,

0 commit comments

Comments
 (0)