11effd9414
This is not a slam dunk, and I can abandon this if it is not deemed
_more_ readable. Having a Map collection literal with a collection-if
and a spread map literal inside (`if (foo) ...{ ... }`) isn't the
most readable code.
I change a programmatic filling of Maps to be declarative, with Map
literals, collection elements like collection-if and collection-for.
In particular, I think the null-aware elements nicely indicate
nullable values, which might not be included in the Map. If something
doesn't appear in the Insights pages from these property maps, it is
more clear from the code that a value might be `null`, and might not
appear.
This simplifies the code all the way through `writeProperties` and
`writeProperty`, which previously considered `null` values, but now
only need to handle Objects.
Change-Id: I64ab32cebbb3ed0b69d3e4005b9ad2c843030636
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465988
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>