svgImageDataKeys top-level constant
Every payload key that may reference a Flutter asset SVG, paired with how the rasterized bytes are attached.
This is the single source of truth for the walker. When a model gains a new
image-bearing toJson() key, add it here. The coverage test
(test/helpers/svg_rasterizer_coverage_test.dart) asserts that every model
image key is represented here so new keys cannot silently slip through.
Models emitting these keys:
image-> CPListItem, CPGridButton, CPPointOfInterest, and all CPListImageRowItem*Element subtypes. Bytes are attached underimageData.imageUrl-> AAListItem (Android Auto). The native contract expects the bytes underimageData.accessoryImage/trailingImage-> CPListItem trailing/accessory image. Bytes are attached undertrailingImageData.gridImages-> CPListImageRowItem (legacy iOS grid images); the native contract expects the bytes undergridImageData.
Implementation
@visibleForTesting
const svgImageDataKeys = <String, String>{
'image': 'imageData',
'imageUrl': 'imageData',
'accessoryImage': 'trailingImageData',
'trailingImage': 'trailingImageData',
'gridImages': 'gridImageData',
};