mirror of
https://github.com/immich-app/immich.git
synced 2024-11-16 02:18:50 -07:00
c1253663b7
* refactor(mobile): services and provider * providers
15 lines
381 B
Dart
15 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();
|
|
}
|
|
}
|