nc-photos/app/lib/controller/session_controller.dart

23 lines
639 B
Dart
Raw Normal View History

2023-08-24 17:32:23 +02:00
import 'package:rxdart/rxdart.dart';
/// Manage volatile global variables bonded to an account session, when the
/// session ends (i.e., sign out), the variables are cleared
class SessionController {
SessionController();
void dispose() {
_hasFiredMetadataTaskController.close();
}
2024-01-30 18:31:52 +01:00
@Deprecated("Use MetadataController")
2023-08-24 17:32:23 +02:00
ValueStream<bool> get hasFiredMetadataTask =>
_hasFiredMetadataTaskController.stream;
2024-01-30 18:31:52 +01:00
@Deprecated("Use MetadataController")
2023-08-24 17:32:23 +02:00
void setFiredMetadataTask(bool value) {
_hasFiredMetadataTaskController.add(value);
}
final _hasFiredMetadataTaskController = BehaviorSubject.seeded(false);
}