canWriteType abstract method
Check if the code for a type annotation for the given type
can be
written.
If a methodBeingCopied
is provided, then type parameters defined by that
method are assumed to be part of what is being written and hence valid
types.
Implementation
bool canWriteType(DartType? type, {ExecutableElement? methodBeingCopied});