AsyncQueryResult<T>.fromValue constructor Null safety

AsyncQueryResult<T>.fromValue(
  1. T? value
)

Create the result from value. If value is null, PendingResult is created Otherwise SucceededResult holds value is created

Implementation

factory AsyncQueryResult.fromValue(T? value) => value == null
    ? AsyncQueryResult.pending()
    : AsyncQueryResult.succeeded(value);