Default error message

This commit is contained in:
Tobe O 2019-08-14 16:14:00 -04:00
parent dafe005cb2
commit 6edbfba7a4

View file

@ -26,7 +26,8 @@ abstract class RateLimiter<User> {
final String errorMessage;
RateLimiter(this.maxPointsPerWindow, this.windowDuration,
{this.errorMessage = 'Rate limit exceeded.'});
{String errorMessage})
: this.errorMessage = errorMessage ?? 'Rate limit exceeded.';
/// Computes the current window in which the user is acting.
///