Import
import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;API Reference
The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.
Segment
const Segment({
super.key,
required this.items,
this.selectedIndex,
this.initialIndex = 0,
this.onChanged,
this.enabled = true,
this.expanded = false,
this.size,
this.backgroundColor,
this.selectedColor,
this.foregroundColor,
this.selectedForegroundColor,
this.focusColor,
this.borderRadius,
this.animationDuration,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
items | List<SegmentItem> | Yes | — |
selectedIndex | int? | No | null |
initialIndex | int | No | 0 |
onChanged | ValueChanged<int>? | No | null |
enabled | bool | No | true |
expanded | bool | No | false |
size | ComponentSize? | No | null |
backgroundColor | Color? | No | null |
selectedColor | Color? | No | null |
foregroundColor | Color? | No | null |
selectedForegroundColor | Color? | No | null |
focusColor | Color? | No | null |
borderRadius | double? | No | null |
animationDuration | Duration? | No | null |
Application Setup
Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.
Source
lib/src/widgets/navigation/segment/segment.dart
This reference is generated from the Segment declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

