replaceDefaultScheduler function

Disposable replaceDefaultScheduler(
  1. Scheduler? scheduler
)

Replaces the default scheduler instance to be used.

Implementation

Disposable replaceDefaultScheduler(Scheduler? scheduler) {
  final originalScheduler = _defaultScheduler;
  _defaultScheduler = scheduler;
  return ActionDisposable(() => _defaultScheduler = originalScheduler);
}