Flutter has a Cupertino Segmentcontrol now: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/segmented_control.dart
A flutter package which adds the Apple's iOS Segment Control UI element.
- Add the package to your pubspec
- Add following code:
new SegmentControl([ new SegmentControlItem("test1", new Text("test1")), new SegmentControlItem("test2", new Text("test2")), new SegmentControlItem("test3", new Text("test3")), ]),
PS: minimum of 1 SegmentControlItem
and maximum of 3 SegmentControlItem
due to this bug: flutter/flutter#12583