run<T> method
Schedules operation after all previously scheduled operations settle.
Implementation
Future<T> run<T>(Future<T> Function() operation) {
final result = _tail.then((_) => operation());
_tail = result.then<void>(
(_) {},
onError: (Object error, StackTrace stack) {},
);
return result;
}