Skip to content
This repository has been archived by the owner on Sep 17, 2018. It is now read-only.

theobouwman/flutter_cupertino_segment_control

Repository files navigation

Development Stopped

Flutter has a Cupertino Segmentcontrol now: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/segmented_control.dart

cupertino_segment_control

A flutter package which adds the Apple's iOS Segment Control UI element.

Getting Started

  • 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

Showcase