copyWith method

HeadlessBrowserResult copyWith({
  1. bool? success,
  2. String? html,
  3. Map<String, dynamic>? data,
  4. Uint8List? screenshot,
  5. String? errorMessage,
  6. int? statusCode,
  7. int? elapsedMillis,
})

Creates a copy of this result with the given fields replaced

Implementation

HeadlessBrowserResult copyWith({
  bool? success,
  String? html,
  Map<String, dynamic>? data,
  Uint8List? screenshot,
  String? errorMessage,
  int? statusCode,
  int? elapsedMillis,
}) {
  return HeadlessBrowserResult(
    success: success ?? this.success,
    html: html ?? this.html,
    data: data ?? this.data,
    screenshot: screenshot ?? this.screenshot,
    errorMessage: errorMessage ?? this.errorMessage,
    statusCode: statusCode ?? this.statusCode,
    elapsedMillis: elapsedMillis ?? this.elapsedMillis,
  );
}