NotificationsProviderState class
Provides all Notifications for the current user.
- Inheritance
-
- Object
- StateNotifier<
List< Notification> > - AutoRefreshStateNotifier<
List< Notification> > - NotificationsProviderState
Constructors
- NotificationsProviderState(NotificationsRepository notificationsRepository)
- Provides all Notifications for the current user.
Properties
-
debugState
→ List<
Notification> -
A development-only way to access state outside of StateNotifier.
read-onlyinherited
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- hasListeners → bool
-
If a listener has been added using addListener and hasn't been removed yet.
read-onlyinherited
- mounted → bool
-
Whether dispose was called or not.
read-onlyinherited
- notificationsRepository → NotificationsRepository
-
The NotificationsRepository to use for receiving notifications.
final
- onError ↔ ErrorListener?
-
A callback for error reporting if one of the listeners added with addListener throws.
read / writeinherited
- refreshRate → Duration
-
The refresh rate of the data.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
state
↔ List<
Notification> -
The current "state" of this StateNotifier.
read / writeinherited
-
stream
→ Stream<
List< Notification> > -
A broadcast stream representation of a StateNotifier.
read-onlyinherited
Methods
-
addListener(
Listener< List< listener, {bool fireImmediately = true}) → RemoveListenerNotification> > -
Subscribes to this object.
inherited
-
dispose(
) → void -
Frees all the resources associated with this object.
inherited
-
filterBy(
{NotificationType? type, bool? read}) → List< Notification> -
Filters the user's notifications by
type
andread
status. -
markAllAsRead(
) → Future< void> - Marks all of the user's notifications as read.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRefresh(
) → FutureOr< List< Notification> > -
Returns the new state.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateShouldNotify(
List< Notification> old, List<Notification> current) → bool -
Whether to notify listeners or not when state changes
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited