getIterableElementType function
DartType?
getIterableElementType(
- DartType dartType
Returns the element type of dartType
, assuming it implements Iterable
.
Returns null otherwise.
Implementation
DartType? getIterableElementType(DartType dartType) => dartType is InterfaceType
? dartType.lookUpInheritedGetter('single')?.returnType
: null;