waiteRender method

Future<bool> waiteRender({
  1. Duration timeout = const Duration(seconds: 3),
})

Implementation

Future<bool> waiteRender({Duration timeout = const Duration(seconds: 3)}) {
  var waitingRender = _waitingRender ??= Completer<bool>();

  if (timeout.inMilliseconds >= 1) {
    return waitingRender.future.timeout(timeout, onTimeout: () => false);
  } else {
    return waitingRender.future;
  }
}