stripFuture method
Strip the outer most future of this type. Throws, if this type is not a future.
Implementation
TypeDefinition stripFuture() {
if (dartType?.isDartAsyncFuture ?? className == 'Future') {
return generics.first;
} else {
throw FormatException(
'$this is not a Future, so Future cant be stripped.');
}
}