isPotentiallyMutatedInScope2 abstract method

  1. @experimental
bool isPotentiallyMutatedInScope2(
  1. VariableElement2 variable
)

If variable is a local variable or parameter declared anywhere within the top level function or method containing this FunctionBody, return a boolean indicating whether variable is potentially mutated within the scope of its declaration.

If variable isn't a local variable or parameter declared within the top level function or method containing this FunctionBody, return false.

Throws an exception if resolution hasn't been performed.

Implementation

@experimental
bool isPotentiallyMutatedInScope2(VariableElement2 variable);