immich/mobile/lib/providers/asset_viewer/scroll_to_date_notifier.provider.dart
Alex c1253663b7
refactor(mobile): services and providers (#9232)
* refactor(mobile): services and provider

* providers
2024-05-02 15:59:14 -05:00

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();
}
}