Skip to content

Commit 716d252

Browse files
authored
Remove prefer_const_constructors ignores (#123284)
Remove prefer_const_constructors ignores
1 parent 11bbce1 commit 716d252

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

packages/flutter/test/material/expansion_tile_test.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,18 +329,17 @@ void main() {
329329
const Key child0Key = Key('child0');
330330
const Key child1Key = Key('child1');
331331

332-
// TODO(goderbauer): Reevaluate the following ignores when https://github.com/dart-lang/sdk/issues/51800 is fixed.
333-
await tester.pumpWidget(MaterialApp( // ignore: prefer_const_constructors
334-
home: Material( // ignore: prefer_const_constructors
335-
child: Center( // ignore: prefer_const_constructors
336-
child: ExpansionTile( // ignore: prefer_const_constructors
337-
title: const Text('title'),
332+
await tester.pumpWidget(const MaterialApp(
333+
home: Material(
334+
child: Center(
335+
child: ExpansionTile(
336+
title: Text('title'),
338337
// Set the column's alignment to Alignment.centerRight to test CrossAxisAlignment
339338
// of children widgets. This helps distinguish the effect of expandedAlignment
340339
// and expandedCrossAxisAlignment later in the test.
341340
expandedAlignment: Alignment.centerRight,
342341
expandedCrossAxisAlignment: CrossAxisAlignment.start,
343-
children: const <Widget>[
342+
children: <Widget>[
344343
SizedBox(height: 100, width: 100, key: child0Key),
345344
SizedBox(height: 100, width: 80, key: child1Key),
346345
],

packages/flutter/test/widgets/selectable_region_context_menu_test.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,15 @@ class RenderSelectionSpy extends RenderProxyBox
144144

145145
@override
146146
SelectionGeometry get value => _value;
147-
// TODO(goderbauer): Reevaluate the ignore when https://github.com/dart-lang/sdk/issues/51800 is fixed.
148-
SelectionGeometry _value = SelectionGeometry( // ignore: prefer_const_constructors
147+
SelectionGeometry _value = const SelectionGeometry(
149148
hasContent: true,
150149
status: SelectionStatus.uncollapsed,
151-
startSelectionPoint: const SelectionPoint(
150+
startSelectionPoint: SelectionPoint(
152151
localPosition: Offset.zero,
153152
lineHeight: 0.0,
154153
handleType: TextSelectionHandleType.left,
155154
),
156-
endSelectionPoint: const SelectionPoint(
155+
endSelectionPoint: SelectionPoint(
157156
localPosition: Offset.zero,
158157
lineHeight: 0.0,
159158
handleType: TextSelectionHandleType.left,

packages/flutter/test/widgets/selectable_region_test.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,16 +1983,15 @@ class RenderSelectionSpy extends RenderProxyBox
19831983

19841984
@override
19851985
SelectionGeometry get value => _value;
1986-
// TODO(goderbauer): Reevaluate the ignore when https://github.com/dart-lang/sdk/issues/51800 is fixed.
1987-
SelectionGeometry _value = SelectionGeometry( // ignore: prefer_const_constructors
1986+
SelectionGeometry _value = const SelectionGeometry(
19881987
hasContent: true,
19891988
status: SelectionStatus.uncollapsed,
1990-
startSelectionPoint: const SelectionPoint(
1989+
startSelectionPoint: SelectionPoint(
19911990
localPosition: Offset.zero,
19921991
lineHeight: 0.0,
19931992
handleType: TextSelectionHandleType.left,
19941993
),
1995-
endSelectionPoint: const SelectionPoint(
1994+
endSelectionPoint: SelectionPoint(
19961995
localPosition: Offset.zero,
19971996
lineHeight: 0.0,
19981997
handleType: TextSelectionHandleType.left,
@@ -2073,16 +2072,15 @@ class RenderSelectAll extends RenderProxyBox
20732072

20742073
@override
20752074
SelectionGeometry get value => _value;
2076-
// TODO(goderbauer): Reevaluate the ignore when https://github.com/dart-lang/sdk/issues/51800 is fixed.
2077-
SelectionGeometry _value = SelectionGeometry( // ignore: prefer_const_constructors
2075+
SelectionGeometry _value = const SelectionGeometry(
20782076
hasContent: true,
20792077
status: SelectionStatus.uncollapsed,
2080-
startSelectionPoint: const SelectionPoint(
2078+
startSelectionPoint: SelectionPoint(
20812079
localPosition: Offset.zero,
20822080
lineHeight: 0.0,
20832081
handleType: TextSelectionHandleType.left,
20842082
),
2085-
endSelectionPoint: const SelectionPoint(
2083+
endSelectionPoint: SelectionPoint(
20862084
localPosition: Offset.zero,
20872085
lineHeight: 0.0,
20882086
handleType: TextSelectionHandleType.left,

0 commit comments

Comments
 (0)