Skip to content

High performance self-hosted photo and video management solution.

467 B
Raw Blame
import 'package:hooks_riverpod/hooks_riverpod.dart';

class ViewIntentFilePathNotifier extends Notifier<String?> {
  @override
  String? build() => null;

  void setPath(String path) {
    if (state == path) {
      return;
    }
    state = path;
  }

  void clear() {
    if (state == null) {
      return;
    }
    state = null;
  }
}

final viewIntentFilePathProvider = NotifierProvider<ViewIntentFilePathNotifier, String?>(
  ViewIntentFilePathNotifier.new,
);