df_debouncer 0.5.4
df_debouncer: ^0.5.4 copied to clipboard
A package that provides a practical Debouncer for optimizing performance by controlling the frequency of function calls in response to rapid events.
Changelog #
0.5.4 #
- Require
df_type: ^0.16.0(was^0.15.0).
0.5.3 #
- breaking: require
df_safer_dart: ^0.21.0(was^0.20.0).
0.5.2 #
- feat:
CacheManagerexpiration consultspackage:clock's ambient clock instead ofDateTime.now(), so tests can drive cache expiration deterministically viawithClock(...)(andFakeAsync.withClock). Production behaviour is unchanged. - Add
clock: ^1.1.0dependency.
0.5.1 #
No consumer-visible changes; release covers tooling and CI only.
0.5.0 #
- breaking: require
df_safer_dart: ^0.20.0(was^0.17.3) anddf_type: ^0.15.0(was^0.14.2). - breaking:
Debouncer.finalize()now resets the started state, so the nextcall()re-firesonStart. Previously_hasStartedpersisted acrossfinalize()and the next call would skiponStart. - feat: add
Debouncer.isPendinggetter andDebouncer.dispose(). - feat: add
Throttle.cancel()to clear the cool-down early. - feat: add
CacheManager.containsKey,.remove,.clear,.length, and.dispose(). - fix:
CacheManagernow cancels the previous expiration timer when re-caching an existing key — a stale timer no longer evicts the fresh value. - fix:
CacheManager.cachewith a non-positivecacheDurationnow evicts immediately instead of scheduling a delayed eviction. - fix:
Throttle.runre-arms the cool-down even if the action throws. - fix:
ThrottleImmediate(and anyThrottleconstructed with a zero or negative duration) no longer spawns aTimerbetween calls.