forwardForeground method

void forwardForeground(
  1. Duration duration
)

Implementation

void forwardForeground(Duration duration) {
  if(isDispose) return;

  setState(() => isVisiableForeground = true);

  foregroundTimer?.cancel();
  foregroundTimer = Timer(duration, () {
    setState(() => isVisiableForeground = false);
  });
}