storeEvaluateName method

EvaluateName? storeEvaluateName(
  1. ObjRef instanceRef,
  2. String? evaluateName, {
  3. bool isNullable = false,
})

Stores evaluateName as the expression that can be evaluated to get instanceRef.

If isNullable is true, records that we should append ? when accessing members to avoid "potentially null" compilation errors from the expression compiler.

Implementation

EvaluateName? storeEvaluateName(vm.ObjRef instanceRef, String? evaluateName,
    {bool isNullable = false}) {
  if (evaluateName == null) {
    return null;
  }
  return _evaluateNamesForInstanceRefIds[instanceRef.id!] =
      (evaluateName: evaluateName, isNullable: isNullable);
}