index method Null safety

Expression index(
  1. Expression index
)

Returns accessing the index operator ([]) on this.

Implementation

Expression index(Expression index) => BinaryExpression._(
      expression,
      CodeExpression(Block.of([
        const Code('['),
        index.code,
        const Code(']'),
      ])),
      '',
    );