Skip to content
Ivan Galkin edited this page Jan 1, 2024 · 1 revision

One of the proposed visions of the segment control component.

FPCToggle

Toggle component with colid colors, decomposed by platform.
Example of using a ready-made component:

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

FPCGradientToggle

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

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