mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
49c4d7cff9
fix orientation for remote assets wip separate widget separate video loader widget fixed memory leak optimized seeking, cleanup debug context pop use global key back to one widget fixed rebuild wait for swipe animation to finish smooth hero animation for remote videos faster scroll animation
32 lines
770 B
Dart
32 lines
770 B
Dart
import 'package:flutter/cupertino.dart';
|
|
|
|
const _spring = SpringDescription(
|
|
mass: 40,
|
|
stiffness: 100,
|
|
damping: 1,
|
|
);
|
|
|
|
// https://stackoverflow.com/a/74453792
|
|
class FastScrollPhysics extends ScrollPhysics {
|
|
const FastScrollPhysics({super.parent});
|
|
|
|
@override
|
|
FastScrollPhysics applyTo(ScrollPhysics? ancestor) {
|
|
return FastScrollPhysics(parent: buildParent(ancestor));
|
|
}
|
|
|
|
@override
|
|
SpringDescription get spring => _spring;
|
|
}
|
|
|
|
class FastClampingScrollPhysics extends ClampingScrollPhysics {
|
|
const FastClampingScrollPhysics({super.parent});
|
|
|
|
@override
|
|
FastClampingScrollPhysics applyTo(ScrollPhysics? ancestor) {
|
|
return FastClampingScrollPhysics(parent: buildParent(ancestor));
|
|
}
|
|
|
|
@override
|
|
SpringDescription get spring => _spring;
|
|
}
|