getFormattedValueIfNotNullOtherwiseValue method

dynamic getFormattedValueIfNotNullOtherwiseValue(
  1. E key
)

Returns getFormattedValueByKey if non-null, otherwise getValueByKey.

Use this in UI code to get the best available display value for a field.

Implementation

dynamic getFormattedValueIfNotNullOtherwiseValue(E key) =>
    getFormattedValueByKey(key) ?? getValueByKey(key);