NotificationsNotifier class
State notifier that manages the logged-in user's list of notifications
- Inheritance
-
- Object
- StateNotifier<
PagedValue< NotificationDTO> > - PagedNotifier<
NotificationDTO> - NotificationsNotifier
Constructors
- NotificationsNotifier(EnergyManagementV3Api? api)
Properties
- api → EnergyManagementV3Api?
-
final
-
debugState
→ PagedValue<
NotificationDTO> -
A development-only way to access state outside of StateNotifier.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
If a listener has been added using addListener and hasn't been removed yet.
no setterinherited
- mounted → bool
-
Whether dispose was called or not.
no setterinherited
- offset ↔ int
-
getter/setter pair
- onError ↔ ErrorListener?
-
A callback for error reporting if one of the listeners added with addListener throws.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ PagedValue<
NotificationDTO> -
The current "state" of this StateNotifier.
getter/setter pairinherited
-
stream
→ Stream<
PagedValue< NotificationDTO> > -
A broadcast stream representation of a StateNotifier.
no setterinherited
Methods
-
addListener(
Listener< PagedValue< listener, {bool fireImmediately = true}) → RemoveListenerNotificationDTO> > -
Subscribes to this object.
inherited
-
combineList(
List< NotificationDTO> ? existing, List<NotificationDTO> pageValue) → List<NotificationDTO> -
Combine the existing list (if available) with a new paged value.
override
-
dispose(
) → void -
Frees all the resources associated with this object.
inherited
-
getPagedValue(
) → Future< List< NotificationDTO> > -
Subclasses must return a single page containing a list of
Tvalues.override -
hasReachedEnd(
List< NotificationDTO> list) → bool -
Should return whether the end of the list has been reached.
inherited
-
incrementPageOffset(
PagedValue< NotificationDTO> value) → void -
Subclasses must use this method to increment their internal
representation of the page offset.
override
-
loadPage(
) → Future< bool> -
Load a new page, which will then be appended to the existing paged value.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
) → Future< void> -
Reload the paged value list from the start, resetting the offset in
the process.
inherited
-
resetPageOffset(
) → void -
Subclasses must reset their internal representation of the page offset.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateShouldNotify(
PagedValue< NotificationDTO> old, PagedValue<NotificationDTO> current) → bool -
Whether to notify listeners or not when state changes
inherited
-
updateValue(
{bool isInitialLoad = false, bool isReload = false}) → Future< void> -
Update the paged value by loading a new page and combining it with
the existing paged value.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited