debugTrackProviderHistory top-level property

  1. @publicInMisc
bool get debugTrackProviderHistory

Whether Riverpod retains previous frames for time-travel debugging.

Defaults to false: only a snapshot of currently mounted providers is kept. Set this to true before creating providers to record their entire history, or enable it later to record from the current snapshot onwards. Recording history retains provider states in memory. Set this back to false to release that history. This flag has no effect in release mode.

Implementation

@publicInMisc
bool get debugTrackProviderHistory => _debugTrackProviderHistory;
  1. @publicInMisc
set debugTrackProviderHistory (bool value)

Implementation

@publicInMisc
set debugTrackProviderHistory(bool value) {
  if (_debugTrackProviderHistory == value) return;
  _debugTrackProviderHistory = value;
  if (kDebugMode && !value) {
    RiverpodDevtool.instance._compactFrames();
    RiverpodDevtool.instance.clearFrameCache();
  }
  if (kDebugMode) debugPostEvent(NewEventNotification(0));
}