virtual_clock 1.0.0-dev.1
virtual_clock: ^1.0.0-dev.1 copied to clipboard
A Flutter package for virtual time manipulation and acceleration. Perfect for testing time-based features like streaks, daily bonuses, and scheduled events without waiting in real-time.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0-dev.1 - 2026-01-06 #
Added #
- Initial release of Virtual Clock package
ClockService- Core service for virtual time management- Time acceleration with configurable clock rate
- Time travel to any date/time
- Fast forward by duration
- Pause and resume functionality
- Persistence across app restarts
- Auto-reset on app version changes
- Production safety (forced to 1x in release builds)
VirtualClock- Global accessor for convenient clock accessVirtualTimer- Timer wrappers that respect virtual timeperiodic()- Repeating timerdelayed()- One-time timerwait()- Async wait
VirtualClockX- DateTime extensionsisVirtualToday()- Check if date is today in virtual timeisVirtualYesterday()- Check if date is yesterday in virtual timeisInVirtualPast()- Check if date is in virtual pastisInVirtualFuture()- Check if date is in virtual futuredifferenceFromVirtualNow()- Get difference from virtual nowisDifferentFromVirtualNow()- Check if different from virtual now
ClockConfig- Configuration class for clock initialization- Comprehensive documentation and examples