Feedback
Add typed ImageViewer stretch values
- Status
- Fixed
- Fixed in
- v26.5.6
- Last updated
- 2026-05-24
Public summary
ImageViewer.Stretch and ImageViewer.StretchDirection currently use magic string values such as "Uniform", "UniformToFill", "Both", and "DownOnly". A typo, such as "UNIFOR", is only caught at runtime and stops the running Objo app with an invalid-argument runtime error.
Add a typed API for these values so users can rely on autocomplete and compile-time checking instead of memorising strings. A likely shape is to mirror the existing ChartType enum-module pattern with values such as ImageStretch.Uniform, ImageStretch.UniformToFill, ImageStretchDirection.Both, and ImageStretchDirection.DownOnly.