copyWithBreadcrumb method

  1. @internal
NoticeRecord copyWithBreadcrumb(
  1. String breadcrumb
)

Implementation

@internal
NoticeRecord copyWithBreadcrumb(String breadcrumb) {
  return NoticeRecord(
    level: level,
    message: message,
    error: error,
    stackTrace: stackTrace,
    timestamp: timestamp,
    // append breadcrumb to the front of the list
    breadcrumbs: breadcrumbs.insert(0, breadcrumb),
  );
}