Skip to content

SegmentControl

Ivan Galkin edited this page Jan 1, 2024 · 1 revision

FPCSegmentControl

Segment control component with solid colors, decomposed by platform.
Example of using a ready-made component:

FPCPrimarySegmentControl<String>(
  value: value,
  onChanged: (String value) {},
  items: const [
    FPCSegmentControlItem<String>(
      value: "first_item",
      title: "First Item",
    ),
    FPCSegmentControlItem<String>(
      value: "second_item",
      title: "Second Item",
    ),
  ],
),
iOS (Cupertino) Android (Material)

FPCGradientSegmentControl

Segment control component with gradient colors, decomposed by platform.
Example of using a ready-made component:

FPCPrimaryGradientSegmentControl<String>(
  value: value,
  onChanged: (String value) {},
  items: const [
    FPCSegmentControlItem<String>(
      value: "first_item",
      title: "First Item",
    ),
    FPCSegmentControlItem<String>(
      value: "second_item",
      title: "Second Item",
    ),
  ],
),
iOS (Cupertino) Android (Material)
Clone this wiki locally