assignConst method
- @Deprecated('Use `declareConst(name).assign(expression)`')
- String name, [
- Reference? type
inherited
Return const {name} = {this}
.
Implementation
@Deprecated('Use `declareConst(name).assign(expression)`')
Expression assignConst(String name, [Reference? type]) => BinaryExpression._(
type == null
? const LiteralExpression._('const')
: BinaryExpression._(
const LiteralExpression._('const'),
type.expression,
'',
),
this,
'$name =',
isConst: true,
);