Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update reorderable_list.dart to use Dart 3 return switch statement for consistency #147505

Merged
merged 1 commit into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions packages/flutter/lib/src/widgets/reorderable_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1486,12 +1486,10 @@ double _sizeExtent(Size size, Axis scrollDirection) {
}

Size _extentSize(double extent, Axis scrollDirection) {
switch (scrollDirection) {
case Axis.horizontal:
return Size(extent, 0);
case Axis.vertical:
return Size(0, extent);
}
return switch (scrollDirection) {
Axis.horizontal => Size(extent, 0),
Axis.vertical => Size(0, extent),
};
}

double _offsetExtent(Offset offset, Axis scrollDirection) {
Expand Down