You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-08 23:07:06 +02:00
feat: generic control bottom app bar (#19524)
* feat: sliver appbar * feat: snapping segment * Date label font size * lint * fix: scrollController reinitialize multiple times * feat: tab navigation * chore: refactor to private widget * feat: new control bottom app bar * bad merge * feat: sliver control bottom app bar
This commit is contained in:
@ -40,19 +40,28 @@ class TimelineArgs {
|
||||
|
||||
class TimelineState {
|
||||
final bool isScrubbing;
|
||||
final bool isScrolling;
|
||||
|
||||
const TimelineState({this.isScrubbing = false});
|
||||
const TimelineState({
|
||||
this.isScrubbing = false,
|
||||
this.isScrolling = false,
|
||||
});
|
||||
|
||||
bool get isInteracting => isScrubbing || isScrolling;
|
||||
|
||||
@override
|
||||
bool operator ==(covariant TimelineState other) {
|
||||
return isScrubbing == other.isScrubbing;
|
||||
return isScrubbing == other.isScrubbing && isScrolling == other.isScrolling;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => isScrubbing.hashCode;
|
||||
int get hashCode => isScrubbing.hashCode ^ isScrolling.hashCode;
|
||||
|
||||
TimelineState copyWith({bool? isScrubbing}) {
|
||||
return TimelineState(isScrubbing: isScrubbing ?? this.isScrubbing);
|
||||
TimelineState copyWith({bool? isScrubbing, bool? isScrolling}) {
|
||||
return TimelineState(
|
||||
isScrubbing: isScrubbing ?? this.isScrubbing,
|
||||
isScrolling: isScrolling ?? this.isScrolling,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,8 +72,15 @@ class TimelineStateNotifier extends Notifier<TimelineState> {
|
||||
state = state.copyWith(isScrubbing: isScrubbing);
|
||||
}
|
||||
|
||||
void setScrolling(bool isScrolling) {
|
||||
state = state.copyWith(isScrolling: isScrolling);
|
||||
}
|
||||
|
||||
@override
|
||||
TimelineState build() => const TimelineState(isScrubbing: false);
|
||||
TimelineState build() => const TimelineState(
|
||||
isScrubbing: false,
|
||||
isScrolling: false,
|
||||
);
|
||||
}
|
||||
|
||||
// This provider watches the buckets from the timeline service & args and serves the segments.
|
||||
|
Reference in New Issue
Block a user