evalIndexExpression method

  1. @override
dynamic evalIndexExpression(
  1. IndexExpression expression,
  2. Map<String, dynamic> context, {
  3. bool nullable = false,
})

Implementation

@override
dynamic evalIndexExpression(
  IndexExpression expression,
  Map<String, dynamic> context, {
  bool nullable = false,
}) {
  dynamic objectIndexValue;
  var objectValue = eval(expression.object, context);
  if (objectValue != null) {
    objectIndexValue =
        eval(expression.object, context)[eval(expression.index, context)];
  }
  return objectIndexValue;
}