isReady<T extends Object> function

bool isReady<T extends Object>({
  1. void onReady(
    1. BuildContext context
    )?,
  2. void onError(
    1. BuildContext context,
    2. Object? error
    )?,
  3. Duration? timeout,
  4. String? instanceName,
})

returns true if the registered async or dependent object defined by T and instanceName is ready and calls onReady onError handlers when the ready state is reached. You can force a timeout Exception if isReady hasn't returned true within timeout. It will trigger a rebuild if this state changes. if no onError is passed in it will throw an exception if an error occurs

Implementation

bool isReady<T extends Object>(
    {void Function(BuildContext context)? onReady,
    void Function(BuildContext context, Object? error)? onError,
    Duration? timeout,
    String? instanceName}) {
  assert(_activeWatchItState != null,
      'isReady can only be called inside a build function within a WatchingWidget or a widget using the WatchItMixin');
  return _activeWatchItState!.isReady<T>(
      instanceName: instanceName,
      onReady: onReady,
      onError: onError,
      timeout: timeout);
}