I want to declare multiple variables on one line in Dart. I tried:
var a = 1, var b = 2;
but my IDE said it expected a ;
where the comma was so I guess that's a no go. Of course if I do use a semi colon like this:
var a = 1; var b = 2;
My IDE will format them like this instead:
var a = 1;
var b = 2;
How can I make them all on one line?
var a = 1, b = 2, c = {}, d = [];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With