isExpired method

  1. @override
bool isExpired(
  1. DateTime now,
  2. DateTime? last
)
override

Determines if the counter is expired based on the current time now and the last update time.

Returns true if the counter is expired, otherwise false.

Implementation

@override
bool isExpired(DateTime now, DateTime? last) =>
    last == null || now.difference(last) >= resetEvery;