requestRepaintDelayed method

  1. @override
Future<bool> requestRepaintDelayed(
  1. Duration delay
)
override

Same as requestRepaint but ensures a delay before refresh.

Implementation

@override
Future<bool> requestRepaintDelayed(Duration delay) {
  var requestedPaint = _requestedPaint;
  if (requestedPaint != null) return requestedPaint;

  if (delay.inMilliseconds == 0) {
    return _requestedPaint = refresh();
  } else {
    return _requestedPaint = Future.delayed(delay, refresh);
  }
}