mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore: add always_put_control_body_on_new_line lint (#28352)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -53,14 +53,18 @@ class FixedSegment extends Segment {
|
||||
@override
|
||||
int getMinChildIndexForScrollOffset(double scrollOffset) {
|
||||
final adjustedOffset = scrollOffset - gridOffset;
|
||||
if (!adjustedOffset.isFinite || adjustedOffset < 0) return firstIndex;
|
||||
if (!adjustedOffset.isFinite || adjustedOffset < 0) {
|
||||
return firstIndex;
|
||||
}
|
||||
return gridIndex + (adjustedOffset / mainAxisExtend).floor();
|
||||
}
|
||||
|
||||
@override
|
||||
int getMaxChildIndexForScrollOffset(double scrollOffset) {
|
||||
final adjustedOffset = scrollOffset - gridOffset;
|
||||
if (!adjustedOffset.isFinite || adjustedOffset < 0) return firstIndex;
|
||||
if (!adjustedOffset.isFinite || adjustedOffset < 0) {
|
||||
return firstIndex;
|
||||
}
|
||||
return gridIndex + (adjustedOffset / mainAxisExtend).ceil() - 1;
|
||||
}
|
||||
|
||||
@@ -162,8 +166,12 @@ class _FixedSegmentRow extends ConsumerWidget {
|
||||
// 0.5: width < mean - threshold
|
||||
// 1.5: width > mean + threshold
|
||||
final arConfiguration = aspectRatios.map((e) {
|
||||
if (e - meanAspectRatio > 0.3) return 1.5;
|
||||
if (e - meanAspectRatio < -0.3) return 0.5;
|
||||
if (e - meanAspectRatio > 0.3) {
|
||||
return 1.5;
|
||||
}
|
||||
if (e - meanAspectRatio < -0.3) {
|
||||
return 0.5;
|
||||
}
|
||||
return 1.0;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user