|
|
|
|
@ -212,11 +212,14 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> {
|
|
|
|
|
if (fallbackSegment != null) {
|
|
|
|
|
// Scroll to the segment with a small offset to show the header
|
|
|
|
|
final targetOffset = fallbackSegment.startOffset - 50;
|
|
|
|
|
_scrollController.animateTo(
|
|
|
|
|
targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent),
|
|
|
|
|
duration: const Duration(milliseconds: 500),
|
|
|
|
|
curve: Curves.easeInOut,
|
|
|
|
|
);
|
|
|
|
|
ref.read(timelineStateProvider.notifier).setScrubbing(true);
|
|
|
|
|
_scrollController
|
|
|
|
|
.animateTo(
|
|
|
|
|
targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent),
|
|
|
|
|
duration: const Duration(milliseconds: 500),
|
|
|
|
|
curve: Curves.easeInOut,
|
|
|
|
|
)
|
|
|
|
|
.whenComplete(() => ref.read(timelineStateProvider.notifier).setScrubbing(false));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|