svgImageDataKeys top-level constant

  1. @visibleForTesting
Map<String, String> const svgImageDataKeys

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 under imageData.
  • imageUrl -> AAListItem (Android Auto). The native contract expects the bytes under imageData.
  • accessoryImage / trailingImage -> CPListItem trailing/accessory image. Bytes are attached under trailingImageData.
  • gridImages-> CPListImageRowItem (legacy iOS grid images); the native contract expects the bytes under gridImageData.

Implementation

@visibleForTesting
const svgImageDataKeys = <String, String>{
  'image': 'imageData',
  'imageUrl': 'imageData',
  'accessoryImage': 'trailingImageData',
  'trailingImage': 'trailingImageData',
  'gridImages': 'gridImageData',
};