- Require Dart 3.4
- Switch to using
package:lints
. - Populate the pubspec
repository
field.
- Update SDK constraints to
>=2.12.0 <3.0.0
. - Update to null safety.
- Update to lowercase Dart core library constants.
This release contains the Clock
class that was defined in quiver
. It's
backwards-compatible with the quiver
version, and mostly
backwards-compatible with the old version of the clock
package.
-
A top-level
clock
field has been added that provides a defaultClock
implementation. It can be controlled by thewithClock()
function. It should generally be used in preference to manual dependency-injection, since it will work with thefake_async
package. -
A
Clock.stopwatch()
method has been added that creates aStopwatch
that uses the clock as its source of time.
-
The top-level
new
getter andgetStopwatch()
methods are deprecated.clock.new()
andclock.stopwatch()
should be used instead. -
Clock.getStopwatch()
is deprecated.Clock.stopwatch()
should be used instead. -
The
isFinal
argument towithClock()
is deprecated. -
new Clock()
now takes an optional positional argument that returns the current time as aDateTime
instead of its old arguments. -
Clock.now()
is now a method rather than a getter.