AsyncError constructor Null safety

AsyncError(
  1. Object error,
  2. StackTrace? stackTrace
)

Implementation

AsyncError(this.error, StackTrace? stackTrace)
    : stackTrace = stackTrace ?? defaultStackTrace(error) {
  // TODO(40614): Remove once non-nullability is sound.
  ArgumentError.checkNotNull(error, "error");
}