Skip to content

Commit 82df235

Browse files
authored
Undo making Flex,Row,Column const (#119669)
1 parent dc86565 commit 82df235

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

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-
const _ButtonBarRow({
236+
_ButtonBarRow({
237237
required super.children,
238238
super.mainAxisSize,
239239
super.mainAxisAlignment,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class _TabLabelBarRenderer extends RenderFlex {
275275
// upon layout. The tab widths are only used at paint time (see _IndicatorPainter)
276276
// or in response to input.
277277
class _TabLabelBar extends Flex {
278-
const _TabLabelBar({
278+
_TabLabelBar({
279279
super.children,
280280
required this.onPerformLayout,
281281
}) : super(

packages/flutter/lib/src/widgets/basic.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4445,7 +4445,9 @@ class Flex extends MultiChildRenderObjectWidget {
44454445
/// to be necessary to decide which direction to lay the children in or to
44464446
/// disambiguate `start` or `end` values for the main or cross axis
44474447
/// directions, the [textDirection] must not be null.
4448-
const Flex({
4448+
// TODO(goderbauer): Figure out whether this can be const.
4449+
// ignore: prefer_const_constructors_in_immutables
4450+
Flex({
44494451
super.key,
44504452
required this.direction,
44514453
this.mainAxisAlignment = MainAxisAlignment.start,
@@ -4812,7 +4814,7 @@ class Row extends Flex {
48124814
/// unless the row has no children or only one child) or to disambiguate
48134815
/// `start` or `end` values for the [mainAxisAlignment], the [textDirection]
48144816
/// must not be null.
4815-
const Row({
4817+
Row({
48164818
super.key,
48174819
super.mainAxisAlignment,
48184820
super.mainAxisSize,
@@ -5005,7 +5007,7 @@ class Column extends Flex {
50055007
/// any. If there is no ambient directionality, and a text direction is going
50065008
/// to be necessary to disambiguate `start` or `end` values for the
50075009
/// [crossAxisAlignment], the [textDirection] must not be null.
5008-
const Column({
5010+
Column({
50095011
super.key,
50105012
super.mainAxisAlignment,
50115013
super.mainAxisSize,

0 commit comments

Comments
 (0)