flutter_fixtures library

Classes

BundleAssetLoader
The production adapter: loads fixture files from the root asset bundle.
DataSelectorDelay
Named response delays, for simulating network or database latency while serving fixtures.
DataSelectorView
Interface for UI components that allow users to pick a fixture
FixtureAssetLoader
Seam for reading fixture files.
FixtureChoice
The outcome of a user-driven fixture selection.
FixtureCollection
Represents a collection of fixture documents
FixtureDocument
Represents a single fixture document
FixtureFileSource<TRequest>
The file-backed FixtureSource: fixture files under mockFolder, read through a FixtureAssetLoader.
FixtureOrigin
Served by FixturesInterceptor from a fixture document.
FixtureOutcome
The result of serving one request through a FixturePipeline.
FixturePipeline<TRequest>
The Fixture Pipeline: everything between "here is a request" and "here is the payload to serve", behind one call.
FixturesDialogView
A dialog-based implementation of DataSelectorView
FixtureServed
A document was selected and its payload loaded.
FixturesInterceptor
Dio interceptor that serves fixture responses through a FixturePipeline.
FixtureSource<TRequest>
The seam for providing fixtures for one kind of request.
FixtureSources<TRequest>
An ordered composite of FixtureSources — itself a source.
ForwardToSource
Let the request continue to the real source.
HttpFileFixtureSource
The file-backed HTTP fixture source: core's FixtureFileSource with the HTTP file naming convention.
HttpFixtureRequest
The HTTP request shape fixture sources resolve against.
LiveOrigin
Not stamped by this package: the network, or another interceptor.
OpenApiFixtureSource
Builds fixture collections from an OpenAPI 3.x JSON document.
RecordedInteraction
One captured request/response pair inside a Recording Session.
RecordedRequest
A source-agnostic description of one request.
RecordedSources
The source names the built-in adapters use for RecordedRequest.source — owned by core so sessions from every adapter agree on them.
RecorderInterceptor
The Dio adapter for the record-and-replay seam (TrafficRecorder).
RejectRequest
Fail the request without touching the real source.
ReplayDecision
The recorder's answer to "how should this request be handled?".
Replayed
Serve this recorded interaction instead of touching the real source.
ReplayOrigin
Served by RecorderInterceptor from a recording session.
ResponseOrigin
Where a Dio response came from, as stamped by this package's interceptors — read it once instead of re-deriving it from header strings and recorder state.
TrafficRecorder
The thin record-and-replay seam between source adapters and a recorder.

Enums

DataSelectorType
Defines the strategy for selecting a fixture from a collection
ReplayMissBehavior
What a transport adapter does with a request that has no recorded response during replay.

Extensions

TrafficRecorderRun on TrafficRecorder
The record-and-replay choreography for call/return sources, owned once.

Typedefs

FixtureCandidates<TRequest> = List<String> Function(TRequest request)
Names the fixture-file candidates for one request, most specific first. The file source tries them in order and serves the first that exists.
HttpFixtureSource = FixtureSource<HttpFixtureRequest>
The HTTP-typed FixtureSource: resolve takes an HttpFixtureRequest and returns a FixtureCollection, or null when the source has none.
HttpFixtureSources = FixtureSources<HttpFixtureRequest>
The ordered composite of HTTP sources — see FixtureSources.
RequestKeyBuilder = String Function(RecordedRequest request)
Builds the lookup key used to match a live request against recorded interactions during replay.

Exceptions / Errors

FixtureCancelled
The user dismissed the interactive pick without choosing.
FixtureEmpty
A collection was found, but it holds no documents to choose from.
FixtureMiss
A request the pipeline could not serve. Carries its own message and is throwable, so the case survives into whatever error an adapter raises.
FixtureNotFound
No source had a fixture collection for the request.