DebugNetworkLogger class

Network logger that stores HTTP requests.

Usage:

final dio = Dio();
dio.interceptors.add(DebugNetworkInterceptor());

// Or manually log requests:
DebugNetworkLogger.logRequest(request);

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

requestCount int
Get the number of requests.
no setter
requests List<DebugNetworkRequest>
Get all network requests.
no setter

Static Methods

addListener(void listener(DebugNetworkRequest)) → void
Add a listener that gets called when a new request is added.
clear() → void
Clear all requests.
getByStatus(bool success) List<DebugNetworkRequest>
Get requests filtered by status.
logRequest(DebugNetworkRequest request) → void
Log a network request.
removeListener(void listener(DebugNetworkRequest)) → void
Remove a listener.
Search requests by URL.
updateRequest(DebugNetworkRequest request) → void
Update an existing request (e.g., when response arrives).