You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SegmentedControl: allow an icon per segment (like SegmentedButton's ButtonSegment(icon:, label:)) #69
I searched the existing feature requests and this is not a duplicate.
Framework or plugin?
Framework
Platform
Both
Use case
Our app (a fleet ledger ported from Flutter) switches a record list between Expenses, Maintenance and Debts with a segmented control. The Flutter app used SegmentedButton with an icon in each segment (a receipt, a wrench, a handshake). In DartNative 1.0.0, SegmentedControl takes segments: List<String>, so a segment can only be a title and the icons are dropped in the port.
error • The function 'SegmentedButton' isn't defined • undefined_function
error • The function 'ButtonSegment' isn't defined • undefined_function
Both platforms' controls support images in segments (UISegmentedControl.setImage(_:forSegmentAt:) / UIAction(title:image:) on iOS, icons in Material's segmented button on Android), so this looks like a gap in the Dart API rather than in the native control.
Workaround: none that keeps the native control; we use text only, or draw our own segmented row, which loses the native look and behaviour.
icon as an IconData (font glyph, as Icon already renders natively) or an SF Symbol / drawable name; icon-only segments when label is null. A Flutter-compatible SegmentedButton<T> with ButtonSegment(value:, icon:, label:) mapping to the same native control would also cover ported code.
The next framework update adds SegmentedButton and ButtonSegment on the native controls, including styleFrom. On Android a segment shows its icon and label. On iPhone it shows one or the other: UISegmentedControl can't hold both, and React Native makes the same choice.
If you want an icon and text on both platforms, you can build your own segmented control from Row, Icon, Text and GestureDetector, as you would in Flutter. It's a small widget, and you could publish it as a plugin so every DartNative user can use it.
Activity
gabrijm commentedon Oct 6, 2026
The next framework update adds SegmentedButton and ButtonSegment on the native controls, including styleFrom. On Android a segment shows its icon and label. On iPhone it shows one or the other: UISegmentedControl can't hold both, and React Native makes the same choice.
If you want an icon and text on both platforms, you can build your own segmented control from Row, Icon, Text and GestureDetector, as you would in Flutter. It's a small widget, and you could publish it as a plugin so every DartNative user can use it.