copyWith method

Request copyWith({
  1. String? url,
  2. Query? query,
  3. RequestType? type,
})

copyWith will copy Request into a new object, changing the variable values

Implementation

Request copyWith({
  String? url,
  Query? query,
  RequestType? type,
}) {
  return Request(
    url: url ?? this.url,
    query: query ?? this.query,
    type: type ?? this.type,
  );
}