currentMatch method

bool currentMatch(
  1. dynamic exp
)

Implementation

bool currentMatch(exp) {
  return (source != null &&
      exp is String &&
      ((RegExp('#\\(.+\\)', multiLine: true).hasMatch(exp) &&
              (exp.contains('\$item') || exp.contains('\$index'))) ||
          exp == 'item' ||
          exp == 'index' ||
          exp.startsWith('\$(item') ||
          exp.startsWith('\$(index') ||
          exp.startsWith('#(\${index') ||
          exp.startsWith('#(\${item') ||
          exp.startsWith('^(index)') ||
          exp.startsWith('^(item)')));
}