declareVar function Null safety
Declare a variable named variableName
.
Returns var {variableName}
, or {type} {variableName}
.
If late
is true the declaration is prefixed with late
.
Implementation
Expression declareVar(String variableName,
{Reference? type, bool late = false}) =>
_late(
late,
type == null
? LiteralExpression._('var $variableName')
: _typedVar(variableName, type));