asSync property

T get asSync

Casts a value to a synchronous value or throws a TypeError if the value is a Future.

Implementation

T get asSync {
  try {
    return asSyncOrNull!;
  } catch (e) {
    throw TypeError();
  }
}