mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
23 lines
448 B
Dart
23 lines
448 B
Dart
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
/// Whether to display the video part of a motion photo
|
|
final isSearchingProvider = StateNotifierProvider<IsSearching, bool>((ref) {
|
|
return IsSearching(ref);
|
|
});
|
|
|
|
class IsSearching extends StateNotifier<bool> {
|
|
IsSearching(this.ref) : super(false);
|
|
|
|
final Ref ref;
|
|
|
|
bool get value => state;
|
|
|
|
set value(bool value) {
|
|
state = value;
|
|
}
|
|
|
|
void toggle() {
|
|
state = !state;
|
|
}
|
|
}
|