assignFinal method Null safety

Expression assignFinal(
  1. String name,
  2. [Reference? type]
)

Return final {name} = {this}.

Implementation

Expression assignFinal(String name, [Reference? type]) => BinaryExpression._(
      type == null
          ? const LiteralExpression._('final')
          : BinaryExpression._(
              const LiteralExpression._('final'),
              type.expression,
              '',
            ),
      this,
      '$name =',
    );