Skip to content

Commit 463a153

Browse files
Reverts "Introduce double Flex.spacing parameter for Row/Column spacing (#152472)" (#152885)
Reverts: flutter/flutter#152472 Initiated by: goderbauer Reason for reverting: Tests are failing, e.g. https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20tool_integration_tests_5_5/127/overview Original PR Author: TahaTesser Reviewed By: {Piinks, goderbauer, Hixie} This change reverts the following previous change: fixes [add spacing parameter to Column and Row](flutter/flutter#55378) ### `Column.spacing` Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @OverRide Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( backgroundColor: Colors.black, body: Center( child: Padding( padding: const EdgeInsets.all(16.0), child: DecoratedBox( decoration: BoxDecoration( border: Border.all( color: Colors.amber, )), child: const Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ Column( spacing: 40.0, // ignore: avoid_redundant_argument_values mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.topCenter, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.bottomCenter, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Column( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.topCenter, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.bottomCenter, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Column( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.topCenter, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.bottomCenter, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Column( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.topCenter, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.bottomCenter, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Column( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.spaceAround, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.topCenter, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.bottomCenter, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Column( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.topCenter, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.bottomCenter, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), ], ), ), ), ), ), ); } } ``` </details> ### Preview <img width="1072" alt="Screenshot 2024-07-30 at 15 40 59" src="https://github.com/user-attachments/assets/14f21091-9e46-4a58-8552-1379f4ba9216"> ### `Row.spacing` Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @OverRide Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( backgroundColor: Colors.black, body: Center( child: Padding( padding: const EdgeInsets.all(16.0), child: DecoratedBox( decoration: BoxDecoration( border: Border.all( color: Colors.amber, )), child: const Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ Row( spacing: 40.0, // ignore: avoid_redundant_argument_values mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerLeft, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerRight, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Row( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerLeft, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerRight, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Row( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerLeft, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerRight, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Row( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerLeft, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerRight, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Row( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.spaceAround, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerLeft, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerRight, child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), Row( spacing: 40.0, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ ColoredBox( color: Color(0xffff0000), child: SizedBox( width: 50.0, height: 75.0, child: Align( alignment: Alignment.centerLeft, child: Text( 'RED', style: TextStyle(color: Colors.white), ), ), ), ), ColoredBox( color: Color(0xff00ff00), child: SizedBox( width: 50.0, height: 75.0, child: Center( child: Text( 'GREEN', style: TextStyle(color: Colors.black), ), ), ), ), ColoredBox( color: Color(0xff0000ff), child: SizedBox( width: 50.0, height: 75.0, child: Align( child: Text( 'BLUE', style: TextStyle(color: Colors.white), ), ), ), ), ], ), ], ), ), ), ), ), ); } } ``` </details> ### Preview <img width="1072" alt="Screenshot 2024-07-30 at 15 39 42" src="https://github.com/user-attachments/assets/717e9f5e-a491-4853-ba74-e72ec7493363">
1 parent 68983f7 commit 463a153

4 files changed

Lines changed: 18 additions & 617 deletions

File tree

packages/flutter/lib/src/rendering/flex.dart

Lines changed: 16 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -215,19 +215,19 @@ enum MainAxisAlignment {
215215
/// after the first and last child.
216216
spaceEvenly;
217217

218-
(double leadingSpace, double betweenSpace) _distributeSpace(double freeSpace, int itemCount, bool flipped, double spacing) {
218+
(double leadingSpace, double betweenSpace) _distributeSpace(double freeSpace, int itemCount, bool flipped) {
219219
assert(itemCount >= 0);
220220
return switch (this) {
221-
MainAxisAlignment.start => flipped ? (freeSpace, spacing) : (0.0, spacing),
221+
MainAxisAlignment.start => flipped ? (freeSpace, 0.0) : (0.0, 0.0),
222222

223-
MainAxisAlignment.end => MainAxisAlignment.start._distributeSpace(freeSpace, itemCount, !flipped, spacing),
224-
MainAxisAlignment.spaceBetween when itemCount < 2 => MainAxisAlignment.start._distributeSpace(freeSpace, itemCount, flipped, spacing),
225-
MainAxisAlignment.spaceAround when itemCount == 0 => MainAxisAlignment.start._distributeSpace(freeSpace, itemCount, flipped, spacing),
223+
MainAxisAlignment.end => MainAxisAlignment.start._distributeSpace(freeSpace, itemCount, !flipped),
224+
MainAxisAlignment.spaceBetween when itemCount < 2 => MainAxisAlignment.start._distributeSpace(freeSpace, itemCount, flipped),
225+
MainAxisAlignment.spaceAround when itemCount == 0 => MainAxisAlignment.start._distributeSpace(freeSpace, itemCount, flipped),
226226

227-
MainAxisAlignment.center => (freeSpace / 2.0, spacing),
228-
MainAxisAlignment.spaceBetween => (0.0, freeSpace / (itemCount - 1) + spacing),
229-
MainAxisAlignment.spaceAround => (freeSpace / itemCount / 2, freeSpace / itemCount + spacing),
230-
MainAxisAlignment.spaceEvenly => (freeSpace / (itemCount + 1), freeSpace / (itemCount + 1) + spacing),
227+
MainAxisAlignment.center => (freeSpace / 2.0, 0.0),
228+
MainAxisAlignment.spaceBetween => (0.0, freeSpace / (itemCount - 1)),
229+
MainAxisAlignment.spaceAround => (freeSpace / itemCount / 2, freeSpace / itemCount),
230+
MainAxisAlignment.spaceEvenly => (freeSpace / (itemCount + 1), freeSpace / (itemCount + 1)),
231231
};
232232
}
233233
}
@@ -390,17 +390,14 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
390390
VerticalDirection verticalDirection = VerticalDirection.down,
391391
TextBaseline? textBaseline,
392392
Clip clipBehavior = Clip.none,
393-
double spacing = 0.0,
394393
}) : _direction = direction,
395394
_mainAxisAlignment = mainAxisAlignment,
396395
_mainAxisSize = mainAxisSize,
397396
_crossAxisAlignment = crossAxisAlignment,
398397
_textDirection = textDirection,
399398
_verticalDirection = verticalDirection,
400399
_textBaseline = textBaseline,
401-
_clipBehavior = clipBehavior,
402-
_spacing = spacing,
403-
assert(spacing >= 0.0) {
400+
_clipBehavior = clipBehavior {
404401
addAll(children);
405402
}
406403

@@ -591,69 +588,6 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
591588
}
592589
}
593590

594-
/// {@template flutter.rendering.RenderFlex.spacing}
595-
/// How much space to place between children in the main axis.
596-
///
597-
/// The spacing is only applied between children in the main axis.
598-
///
599-
/// If the [spacing] is 10.0 and the [mainAxisAlignment] is
600-
/// [MainAxisAlignment.start], then the first child will be placed at the start
601-
/// of the main axis, and the second child will be placed 10.0 pixels after
602-
/// the first child in the main axis, and so on. The [spacing] is not applied
603-
/// before the first child or after the last child.
604-
///
605-
/// If the [spacing] is 10.0 and the [mainAxisAlignment] is [MainAxisAlignment.end],
606-
/// then the last child will be placed at the end of the main axis, and the
607-
/// second-to-last child will be placed 10.0 pixels before the last child in
608-
/// the main axis, and so on. The [spacing] is not applied before the first
609-
/// child or after the last child.
610-
///
611-
/// If the [spacing] is 10.0 and the [mainAxisAlignment] is [MainAxisAlignment.center],
612-
/// then the children will be placed in the center of the main axis with 10.0
613-
/// pixels of space between the children. The [spacing] is not applied before the first
614-
/// child or after the last child.
615-
///
616-
/// If the [spacing] is 10.0 and the [mainAxisAlignment] is [MainAxisAlignment.spaceBetween],
617-
/// then there will be a minimum of 10.0 pixels of space between each child in the
618-
/// main axis. If the free space is 100.0 pixels between the two children,
619-
/// then the minimum space between the children will be 10.0 pixels and the
620-
/// remaining 90.0 pixels will be the free space between the children. The
621-
/// [spacing] is not applied before the first child or after the last child.
622-
///
623-
/// If the [spacing] is 10.0 and the [mainAxisAlignment] is [MainAxisAlignment.spaceAround],
624-
/// then there will be a minimum of 10.0 pixels of space between each child in the
625-
/// main axis, and the remaining free space will be placed between the children as
626-
/// well as before the first child and after the last child. The [spacing] is
627-
/// not applied before the first child or after the last child.
628-
///
629-
/// If the [spacing] is 10.0 and the [mainAxisAlignment] is [MainAxisAlignment.spaceEvenly],
630-
/// then there will be a minimum of 10.0 pixels of space between each child in the
631-
/// main axis, and the remaining free space will be evenly placed between the
632-
/// children as well as before the first child and after the last child. The
633-
/// [spacing] is not applied before the first child or after the last child.
634-
///
635-
/// When the [spacing] is non-zero, the layout size will be larger than
636-
/// the sum of the children's layout sizes in the main axis.
637-
///
638-
/// When the total children's layout sizes and total spacing between the
639-
/// children is greater than the maximum constraints in the main axis, then
640-
/// the children will overflow. For example, if there are two children and the
641-
/// maximum constraint is 100.0 pixels, the children's layout sizes are 50.0
642-
/// pixels each, and the spacing is 10.0 pixels, then the children will
643-
/// overflow by 10.0 pixels.
644-
///
645-
/// Defaults to 0.0.
646-
/// {@endtemplate}
647-
double get spacing => _spacing;
648-
double _spacing;
649-
set spacing (double value) {
650-
if (_spacing == value) {
651-
return;
652-
}
653-
_spacing = value;
654-
markNeedsLayout();
655-
}
656-
657591
@override
658592
void setupParentData(RenderBox child) {
659593
if (child.parentData is! FlexParentData) {
@@ -663,15 +597,15 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
663597

664598
double _getIntrinsicSize({
665599
required Axis sizingDirection,
666-
required double extent, // The extent in the direction that isn't the sizing direction.
667-
required _ChildSizingFunction childSize, // A method to find the size in the sizing direction.
600+
required double extent, // the extent in the direction that isn't the sizing direction
601+
required _ChildSizingFunction childSize, // a method to find the size in the sizing direction
668602
}) {
669603
if (_direction == sizingDirection) {
670604
// INTRINSIC MAIN SIZE
671605
// Intrinsic main size is the smallest size the flex container can take
672606
// while maintaining the min/max-content contributions of its flex items.
673607
double totalFlex = 0.0;
674-
double inflexibleSpace = spacing * (childCount - 1);
608+
double inflexibleSpace = 0.0;
675609
double maxFlexFractionSoFar = 0.0;
676610
for (RenderBox? child = firstChild; child != null; child = childAfter(child)) {
677611
final int flex = _getFlex(child);
@@ -891,7 +825,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
891825
case Axis.vertical:
892826
final double freeSpace = math.max(0.0, sizes.mainAxisFreeSpace);
893827
final bool flipMainAxis = _flipMainAxis;
894-
final (double leadingSpaceY, double spaceBetween) = mainAxisAlignment._distributeSpace(freeSpace, childCount, flipMainAxis, spacing);
828+
final (double leadingSpaceY, double spaceBetween) = mainAxisAlignment._distributeSpace(freeSpace, childCount, flipMainAxis);
895829
double y = flipMainAxis
896830
? leadingSpaceY + (childCount - 1) * spaceBetween + (sizes.axisSize.mainAxisExtent - sizes.mainAxisFreeSpace)
897831
: leadingSpaceY;
@@ -1044,8 +978,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
1044978
int totalFlex = 0;
1045979
RenderBox? firstFlexChild;
1046980
_AscentDescent accumulatedAscentDescent = _AscentDescent.none;
1047-
// Initially, accumulatedSize is the sum of the spaces between children in the main axis.
1048-
_AxisSize accumulatedSize = _AxisSize._(Size(spacing * (childCount - 1), 0.0));
981+
_AxisSize accumulatedSize = _AxisSize.empty;
1049982
for (RenderBox? child = firstChild; child != null; child = childAfter(child)) {
1050983
final int flex;
1051984
if (canFlex && (flex = _getFlex(child)) > 0) {
@@ -1131,7 +1064,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
11311064
final double remainingSpace = math.max(0.0, sizes.mainAxisFreeSpace);
11321065
final bool flipMainAxis = _flipMainAxis;
11331066
final bool flipCrossAxis = _flipCrossAxis;
1134-
final (double leadingSpace, double betweenSpace) = mainAxisAlignment._distributeSpace(remainingSpace, childCount, flipMainAxis, spacing);
1067+
final (double leadingSpace, double betweenSpace) = mainAxisAlignment._distributeSpace(remainingSpace, childCount, flipMainAxis);
11351068
final (_NextChild nextChild, RenderBox? topLeftChild) = flipMainAxis ? (childBefore, lastChild) : (childAfter, firstChild);
11361069
final double? baselineOffset = sizes.baselineOffset;
11371070
assert(baselineOffset == null || (crossAxisAlignment == CrossAxisAlignment.baseline && direction == Axis.horizontal));
@@ -1259,6 +1192,5 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
12591192
properties.add(EnumProperty<TextDirection>('textDirection', textDirection, defaultValue: null));
12601193
properties.add(EnumProperty<VerticalDirection>('verticalDirection', verticalDirection, defaultValue: null));
12611194
properties.add(EnumProperty<TextBaseline>('textBaseline', textBaseline, defaultValue: null));
1262-
properties.add(DoubleProperty('spacing', spacing, defaultValue: null));
12631195
}
12641196
}

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4604,7 +4604,6 @@ class Flex extends MultiChildRenderObjectWidget {
46044604
this.verticalDirection = VerticalDirection.down,
46054605
this.textBaseline, // NO DEFAULT: we don't know what the text's baseline should be
46064606
this.clipBehavior = Clip.none,
4607-
this.spacing = 0.0,
46084607
super.children,
46094608
}) : assert(!identical(crossAxisAlignment, CrossAxisAlignment.baseline) || textBaseline != null, 'textBaseline is required if you specify the crossAxisAlignment with CrossAxisAlignment.baseline');
46104609
// Cannot use == in the assert above instead of identical because of https://github.com/dart-lang/language/issues/1811.
@@ -4711,9 +4710,6 @@ class Flex extends MultiChildRenderObjectWidget {
47114710
/// Defaults to [Clip.none].
47124711
final Clip clipBehavior;
47134712

4714-
/// {@macro flutter.rendering.RenderFlex.spacing}
4715-
final double spacing;
4716-
47174713
bool get _needTextDirection {
47184714
switch (direction) {
47194715
case Axis.horizontal:
@@ -4755,7 +4751,6 @@ class Flex extends MultiChildRenderObjectWidget {
47554751
verticalDirection: verticalDirection,
47564752
textBaseline: textBaseline,
47574753
clipBehavior: clipBehavior,
4758-
spacing: spacing,
47594754
);
47604755
}
47614756

@@ -4769,8 +4764,7 @@ class Flex extends MultiChildRenderObjectWidget {
47694764
..textDirection = getEffectiveTextDirection(context)
47704765
..verticalDirection = verticalDirection
47714766
..textBaseline = textBaseline
4772-
..clipBehavior = clipBehavior
4773-
..spacing = spacing;
4767+
..clipBehavior = clipBehavior;
47744768
}
47754769

47764770
@override
@@ -4783,8 +4777,6 @@ class Flex extends MultiChildRenderObjectWidget {
47834777
properties.add(EnumProperty<TextDirection>('textDirection', textDirection, defaultValue: null));
47844778
properties.add(EnumProperty<VerticalDirection>('verticalDirection', verticalDirection, defaultValue: VerticalDirection.down));
47854779
properties.add(EnumProperty<TextBaseline>('textBaseline', textBaseline, defaultValue: null));
4786-
properties.add(EnumProperty<Clip>('clipBehavior', clipBehavior, defaultValue: Clip.none));
4787-
properties.add(DoubleProperty('spacing', spacing, defaultValue: 0.0));
47884780
}
47894781
}
47904782

@@ -4991,7 +4983,6 @@ class Row extends Flex {
49914983
super.textDirection,
49924984
super.verticalDirection,
49934985
super.textBaseline, // NO DEFAULT: we don't know what the text's baseline should be
4994-
super.spacing,
49954986
super.children,
49964987
}) : super(
49974988
direction: Axis.horizontal,
@@ -5183,7 +5174,6 @@ class Column extends Flex {
51835174
super.textDirection,
51845175
super.verticalDirection,
51855176
super.textBaseline,
5186-
super.spacing,
51875177
super.children,
51885178
}) : super(
51895179
direction: Axis.vertical,

0 commit comments

Comments
 (0)