NetworkLog class
Represents a network request/response log entry
Constructors
-
NetworkLog({required String id, required String method, required String url, required DateTime timestamp, required int duration, required int? statusCode, required Map<
String, String> requestHeaders, required Map<String, String> responseHeaders, required String? requestBody, required String? responseBody, required String? error}) -
Creates a new NetworkLog instance
const
Properties
- duration → int
-
Duration of the request in milliseconds
final
- error → String?
-
Error message if the request failed
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Unique identifier for the log entry
final
- method → String
-
HTTP method (GET, POST, PUT, DELETE, etc.)
final
- requestBody → String?
-
Request body content
final
-
requestHeaders
→ Map<
String, String> -
Request headers
final
- responseBody → String?
-
Response body content
final
-
responseHeaders
→ Map<
String, String> -
Response headers
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int?
-
HTTP status code of the response
final
- timestamp → DateTime
-
Timestamp when the request was made
final
- url → String
-
Request URL
final
Methods
-
copyWith(
{String? id, String? method, String? url, DateTime? timestamp, int? duration, int? statusCode, Map< String, String> ? requestHeaders, Map<String, String> ? responseHeaders, String? requestBody, String? responseBody, String? error}) → NetworkLog - Creates a copy of this NetworkLog with the given fields replaced
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override