visitWriteStaticMemberExpr method

  1. @override
void visitWriteStaticMemberExpr(
  1. WriteStaticMemberExpr expr,
  2. EmitterVisitorContext context
)
override

Implementation

@override
void visitWriteStaticMemberExpr(
    o.WriteStaticMemberExpr expr, EmitterVisitorContext context) {
  var lineWasEmpty = context.lineIsEmpty();
  if (!lineWasEmpty) {
    context.print('(');
  }
  if (expr.checkIfNull) {
    context.print('${expr.name} ??= ');
  } else {
    context.print('${expr.name} = ');
  }
  expr.value.visitExpression(this, context);
  if (!lineWasEmpty) {
    context.print(')');
  }
}