core library

The pure-Dart core of Peek: the network-call model, the adapter contract and the in-memory store.

Adapter packages import this library and nothing else — it never depends on Flutter.

Classes

InMemoryPeekStore
A PeekStore that keeps at most maxEntries entries in memory.
Peek
The heart of Peek: the sink adapters report into and the store the UI reads from, with redaction and size limits applied in between.
PeekAdapter
An adapter that feeds a logger's output into Peek.
PeekBody
The body of a request or response — as much of it as Peek could capture.
PeekBodyTruncator
Cuts bodies down to a byte budget, keeping their size on the wire so they read as truncated rather than small.
PeekBytesBody
A body held as raw bytes.
PeekClock
Source of the current time for everything Peek timestamps.
PeekCookie
One cookie from a Cookie request header or a Set-Cookie response header.
PeekCurlExporter
Turns a request into a curl command that can be pasted into a shell.
PeekDateRange
A closed or half-open range of moments.
PeekDurationRange
A closed or half-open range of durations.
PeekEmptyBody
No body at all.
PeekEntry
One network call as Peek shows it: the request, whatever came back, and when it all happened.
PeekEntryAdded
A new entry was added.
PeekEntryRecorded
A whole call, reported at once by a source that only learns about calls after they end — a log history, say.
PeekEntryRemoved
An entry was removed, by hand or by eviction.
PeekEntryUpdated
An existing entry was replaced.
PeekEvent
Something an adapter observed about a network call.
PeekEventReducer
Folds adapter events into a PeekStore.
PeekExporters
Every way Peek can hand an entry to something else.
PeekFacets
The values a filter can pick from, counted over a set of entries.
PeekFailure
What went wrong with a network call.
PeekFakeClock
A clock that only moves when told to.
PeekFilter
Which entries to show. Every criterion that is set must hold; an empty set, an unbounded range or an empty query means "any".
PeekFormBody
A form body: URL-encoded fields, or multipart fields and files.
PeekFormField
One name=value field of a form body.
PeekFormFile
One file part of a multipart body. Only metadata is kept: file contents are never captured.
PeekHarExporter
Writes entries as an HTTP Archive (HAR 1.2) document.
PeekHeaders
An immutable, case-insensitive multimap of HTTP headers.
PeekId
Identifies one network call across the events an adapter reports for it.
PeekLimits
How much Peek keeps.
PeekMarkdownExporter
Writes an entry as Markdown, for an issue or a pull request.
PeekMediaType
A parsed Content-Type value such as application/json; charset=utf-8.
PeekOptions
How a Peek instance behaves.
PeekQuery
What the list shows: which entries, in which order.
PeekRedactionPolicy
Which headers, query parameters and body keys Peek masks before storing a call, so secrets never sit in memory or reach the screen.
PeekRedactor
Applies a PeekRedactionPolicy to what adapters report.
PeekRedirect
One hop of a redirect chain.
PeekRequest
The request half of a network call: what was sent.
PeekRequestFailed
A call that started earlier failed.
PeekRequestStarted
A request went out.
PeekResponse
The response half of a network call: what came back.
PeekResponseReceived
A response came back for a call that started earlier.
PeekSearchQuery
A case-insensitive text search over entries.
PeekSink
Where adapters send what they observe.
PeekSort
An order for entries.
PeekStore
Holds the entries Peek shows.
PeekStoreChange
What changed in a PeekStore.
PeekStoreCleared
Every entry was removed at once.
PeekSystemClock
The wall clock.
PeekTextBody
A body held as text.
PeekTextExporter
Writes an entry as plain text, for pasting into a chat or a ticket.
PeekTimings
How the time of a call was spent, phase by phase, for adapters that know.
PeekUnavailableBody
A body that exists but was not captured.

Enums

PeekBodyUnavailableReason
Why a body exists but was not captured.
PeekEntryState
Where a call is in its life.
PeekFailureKind
Why a network call failed.
PeekReduction
What a PeekEventReducer did with an event.
PeekSearchScope
Where a PeekSearchQuery looks.
PeekSortField
What entries are ordered by.
PeekStatusClass
The class of an HTTP status code: its first digit.

Constants

peekVersion → const String
The version of the peek package, as written into exports.

Typedefs

PeekErrorHandler = void Function(Object error, StackTrace stackTrace)
Receives errors Peek swallowed so the app never sees them: an adapter that threw, an event the reducer dropped, a store that failed.

Exceptions / Errors

PeekDroppedEventException
An event the reducer refused, handed to PeekOptions.onError.