mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 10:56:47 +01:00
c1253663b7
* refactor(mobile): services and provider * providers
14 lines
381 B
Dart
14 lines
381 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
final scrollToDateNotifierProvider = ScrollToDateNotifier(null);
|
|
|
|
class ScrollToDateNotifier extends ValueNotifier<DateTime?> {
|
|
ScrollToDateNotifier(super.value);
|
|
|
|
void scrollToDate(DateTime date) {
|
|
value = date;
|
|
|
|
// Manually notify listeners to trigger the scroll, even if the value hasn't changed
|
|
notifyListeners();
|
|
}
|
|
}
|