InfospectNetworkResponse constructor

InfospectNetworkResponse({
  1. int? status,
  2. int size = 0,
  3. DateTime? responseTime,
  4. dynamic body = '',
  5. Map<String, String>? headers,
})

Creates an instance of the InfospectNetworkResponse class.

Parameters:

  • status: The Network status code of the response (optional).
  • size: The size of the response data in bytes (default is 0).
  • responseTime: The timestamp when the response was received (default is the current time).
  • body: The body of the Network response (can be of any type).
  • headers: The headers of the Network response (optional).

Implementation

InfospectNetworkResponse({
  this.status,
  this.size = 0,
  DateTime? responseTime,
  this.body = '',
  this.headers,
}) : time = responseTime ?? DateTime.now();