NetworkEventStore class

Bounded, FIFO ring buffer of captured NetworkEvents.

Inheritance

Constructors

NetworkEventStore({int maxEntries = 200})

Properties

events List<NetworkEvent>
Most recent events first is left to consumers; this list is kept in capture order (oldest first).
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
maxEntries int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
begin({required String method, required String url, Map<String, String> queryParameters = const {}, Map<String, String> requestHeaders = const {}, Object? requestBody}) NetworkEvent
Records the start of a request and returns the event so the caller can complete it later via complete.
clear() → void
complete(NetworkEvent event) → void
Notifies listeners that event (already mutated in place by the caller with response/error fields) has completed.
dispose() → void
Discards any resources used by the object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited