choiceLabels property

Map<T, String> choiceLabels
final

Stable labels used for both display and JSON serialization.

Every choice that is a Dart Type must have an entry because Type.toString() is not stable in minified builds. Other choice kinds may also provide labels to override their default string representation.

When migrating existing Type choices, use labels matching their previous unminified names to preserve compatibility with saved JSON.

The provided map is copied and exposed as unmodifiable so these serialized values cannot change after construction.

Implementation

final Map<T, String> choiceLabels;