NetworkLogger class

Network logger singleton to capture all requests

Constructors

NetworkLogger()
factory

Properties

entries List<NetworkLogEntry>
Get all entries (newest first)
no setter
entriesCount int
Get entries count
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Add a listener for updates
clear() → void
Clear all entries
getStatistics() Map<String, dynamic>
Get statistics
logError({required String id, required String error, Duration? duration}) → void
Log an error for an existing entry
logRequest({required String method, required String url, Map<String, dynamic>? headers, dynamic body}) String
Log a new request (returns entry ID)
logResponse({required String id, required int statusCode, Map<String, dynamic>? headers, dynamic body, required Duration duration}) → void
Update an existing entry with response data
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(VoidCallback listener) → void
Remove a listener
toString() String
A string representation of this object.
inherited

Operators

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