Skip to content

Commit 8bf614f

Browse files
authored
Update reorderable_list.dart to use Dart 3 return switch statement for consistency (#147505)
*Update `reorderable_list.dart` from `widgets` to use Dart 3 return switch statement syntax for consistency.* This just a syntax change to match the rest of the functions in this file
1 parent d33bb8f commit 8bf614f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,12 +1486,10 @@ double _sizeExtent(Size size, Axis scrollDirection) {
14861486
}
14871487

14881488
Size _extentSize(double extent, Axis scrollDirection) {
1489-
switch (scrollDirection) {
1490-
case Axis.horizontal:
1491-
return Size(extent, 0);
1492-
case Axis.vertical:
1493-
return Size(0, extent);
1494-
}
1489+
return switch (scrollDirection) {
1490+
Axis.horizontal => Size(extent, 0),
1491+
Axis.vertical => Size(0, extent),
1492+
};
14951493
}
14961494

14971495
double _offsetExtent(Offset offset, Axis scrollDirection) {

0 commit comments

Comments
 (0)