BehaviorSubject<T>
Represents a value that changes over time.
Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications.
Gets the current value or throws an exception.
Initializes a new instance of the BehaviorSubject<T> class which creates a subject that caches its last value and starts with the specified value.
Tries to get the current value or throws an exception.