asFuture property Null safety

Future<Never> asFuture
override

A future that has been completed with this result as a value or an error.

Implementation

@override
Future<Never> get asFuture => Future<Never>.error(error, stackTrace);