FakeClock constructor

FakeClock({
  1. DateTime? initialTime,
  2. bool autoAdvance = false,
})

Creates a fake clock starting at initialTime.

The default epoch is a fixed, arbitrary instant so that tests which format timestamps produce stable output.

Implementation

FakeClock({DateTime? initialTime, this.autoAdvance = false})
  : _now = initialTime?.toUtc() ?? DateTime.utc(2026, 1, 1);