flutter_fixtures_recorder 0.3.0
flutter_fixtures_recorder: ^0.3.0 copied to clipboard
Record and replay real request/response traffic for demos and offline use
Changelog #
0.3.0 #
- Version aligned with the rest of the Flutter Fixtures packages. No functional changes since 0.1.0.
0.1.0 #
- Initial release: record real request/response traffic from any data source and replay it later, in order.
- Source-agnostic domain:
RecordedRequest(source + operation + target) describes requests from any adapter, and one session can hold several sources at once. FixtureRecordercontroller with idle / recording / replaying modes;decidereturns a sealedReplayDecision(Replayed/ForwardToSource/RejectRequest) so adapters only render decisions, never re-implement replay choreography.- Replay serves each recording exactly once, in recorded order per request key; an exhausted key is a miss, so the end of a session's scope is explicit (with
forward, traffic returns to the real source — or to the fixtures picker when composed withFixturesInterceptor).restartReplayrewinds for another pass. RecordingSessionStorepersistence seam with file and in-memory implementations;listreturns lightweightRecordingSessionSummaryvalues, andsessionStoreForDirectorypicks files where possible and memory on web, resolving the directory lazily so recorders construct synchronously. Persistent saves reject unencodable responses loudly.- A save the store rejects loses nothing: the recorder returns to recording with every captured interaction, the error propagates, and
stopRecordingWithPromptreports it in a snackbar so the user can retry or discard. - Replay progress is observable: the recorder notifies on every replayed hit and exposes
replayedCount/replayServeOrder(SessionReplay.servedCount/serveOrder), so timelines read the engine instead of mirroring it. The stop-recording notification fires once the session is saved. - Built-in UI tools:
RecorderToolbar,stopRecordingWithPrompt(the toolbar's save-or-discard flow, reusable from custom surfaces), and the recorded-sessions sheet (deleting the session being replayed stops the replay). - Source adapters ship in the transport packages against core's thin
TrafficRecorderseam:RecorderInterceptor(flutter_fixtures_dio) andRecorderDatabaseAdapter(flutter_fixtures_sqflite).