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
This commit is contained in:
Ellet 2024-05-01 19:03:08 +03:00 committed by GitHub
parent d33bb8fa5e
commit 8bf614f181
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1486,12 +1486,10 @@ double _sizeExtent(Size size, Axis scrollDirection) {
} }
Size _extentSize(double extent, Axis scrollDirection) { Size _extentSize(double extent, Axis scrollDirection) {
switch (scrollDirection) { return switch (scrollDirection) {
case Axis.horizontal: Axis.horizontal => Size(extent, 0),
return Size(extent, 0); Axis.vertical => Size(0, extent),
case Axis.vertical: };
return Size(0, extent);
}
} }
double _offsetExtent(Offset offset, Axis scrollDirection) { double _offsetExtent(Offset offset, Axis scrollDirection) {