property method Null safety

  1. @override
EvaluatedExpr property(
  1. String name
)
override

Get the name property of this expression.

Implementation

@override
EvaluatedExpr property(String name) {
  if (int.tryParse(name) != null) {
    return this[int.parse(name)];
  } else {
    final property = Property.fromName(name);
    switch (property) {
      case Property.length:
        return val(_list.length, retry: retry);
      // ignore: no_default_cases
      default:
        return this[0].property(name);
    }
  }
}