code_builder icon indicating copy to clipboard operation
code_builder copied to clipboard

How to use the new added `Expression.spread` and `Expression.nullSafeSpread` api?

Open rockyoung opened this issue 4 years ago • 1 comments

I'm trying to use these two apis to build a map statement code with some key-value literals and other map references, but have no idea how to use them with literalMap?

rockyoung avatar Sep 06 '21 10:09 rockyoung

I don't think you can include a spread in a Map created from mapLiteral.

srawlins avatar Mar 25 '22 05:03 srawlins

@natebosch this should be fixed now

donny-dont avatar Mar 23 '23 21:03 donny-dont

Fixed in https://github.com/dart-lang/code_builder/pull/400

Thanks @donny-dont !

natebosch avatar Mar 23 '23 22:03 natebosch