Commit 463a153
authored
Reverts "Introduce
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">double Flex.spacing parameter for Row/Column spacing (#152472)" (#152885)1 parent 68983f7 commit 463a153
4 files changed
Lines changed: 18 additions & 617 deletions
File tree
- packages/flutter
- lib/src
- rendering
- widgets
- test
- rendering
- widgets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
226 | 226 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | 393 | | |
395 | 394 | | |
396 | 395 | | |
397 | 396 | | |
398 | 397 | | |
399 | 398 | | |
400 | 399 | | |
401 | | - | |
402 | | - | |
403 | | - | |
| 400 | + | |
404 | 401 | | |
405 | 402 | | |
406 | 403 | | |
| |||
591 | 588 | | |
592 | 589 | | |
593 | 590 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | 591 | | |
658 | 592 | | |
659 | 593 | | |
| |||
663 | 597 | | |
664 | 598 | | |
665 | 599 | | |
666 | | - | |
667 | | - | |
| 600 | + | |
| 601 | + | |
668 | 602 | | |
669 | 603 | | |
670 | 604 | | |
671 | 605 | | |
672 | 606 | | |
673 | 607 | | |
674 | | - | |
| 608 | + | |
675 | 609 | | |
676 | 610 | | |
677 | 611 | | |
| |||
891 | 825 | | |
892 | 826 | | |
893 | 827 | | |
894 | | - | |
| 828 | + | |
895 | 829 | | |
896 | 830 | | |
897 | 831 | | |
| |||
1044 | 978 | | |
1045 | 979 | | |
1046 | 980 | | |
1047 | | - | |
1048 | | - | |
| 981 | + | |
1049 | 982 | | |
1050 | 983 | | |
1051 | 984 | | |
| |||
1131 | 1064 | | |
1132 | 1065 | | |
1133 | 1066 | | |
1134 | | - | |
| 1067 | + | |
1135 | 1068 | | |
1136 | 1069 | | |
1137 | 1070 | | |
| |||
1259 | 1192 | | |
1260 | 1193 | | |
1261 | 1194 | | |
1262 | | - | |
1263 | 1195 | | |
1264 | 1196 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4604 | 4604 | | |
4605 | 4605 | | |
4606 | 4606 | | |
4607 | | - | |
4608 | 4607 | | |
4609 | 4608 | | |
4610 | 4609 | | |
| |||
4711 | 4710 | | |
4712 | 4711 | | |
4713 | 4712 | | |
4714 | | - | |
4715 | | - | |
4716 | | - | |
4717 | 4713 | | |
4718 | 4714 | | |
4719 | 4715 | | |
| |||
4755 | 4751 | | |
4756 | 4752 | | |
4757 | 4753 | | |
4758 | | - | |
4759 | 4754 | | |
4760 | 4755 | | |
4761 | 4756 | | |
| |||
4769 | 4764 | | |
4770 | 4765 | | |
4771 | 4766 | | |
4772 | | - | |
4773 | | - | |
| 4767 | + | |
4774 | 4768 | | |
4775 | 4769 | | |
4776 | 4770 | | |
| |||
4783 | 4777 | | |
4784 | 4778 | | |
4785 | 4779 | | |
4786 | | - | |
4787 | | - | |
4788 | 4780 | | |
4789 | 4781 | | |
4790 | 4782 | | |
| |||
4991 | 4983 | | |
4992 | 4984 | | |
4993 | 4985 | | |
4994 | | - | |
4995 | 4986 | | |
4996 | 4987 | | |
4997 | 4988 | | |
| |||
5183 | 5174 | | |
5184 | 5175 | | |
5185 | 5176 | | |
5186 | | - | |
5187 | 5177 | | |
5188 | 5178 | | |
5189 | 5179 | | |
| |||
0 commit comments