segmented_control_plus 0.1.0 copy "segmented_control_plus: ^0.1.0" to clipboard
segmented_control_plus: ^0.1.0 copied to clipboard

A clean simple segmented control widget that works on all platforms.

Segmented control #

A clean simple segmented control widget that works on all platforms.

Features #

  • Selection mode [Optional]

Usage #

Simple example on how to use the segmented control widget.

    SegmentedControl<int>(
        segments: [
            SegmentIcon(
                icon: Symbols.public_rounded,
                value: 0,
                tooltip: "Public",
            ),
            SegmentIcon(
                icon: Symbols.lock_rounded,
                value: 2,
                tooltip: "Private",
              ),
        ],
        onTap: (val) => action(val),
    ),

You can use either SgementIcon or SegmentIcon Builder:

    SegmentIcon(
        icon: Symbols.public_rounded,
        value: 0,
        tooltip: "Public",
    ),
    SegmentIconBuilder(
        iconBuilder: (context, color) {
            return Icon(
                Symbols.public_rounded,
                size: 22,
                color: color,
            );
        },
        value: 0,
        tooltip: "Public",
    ),

API #

segments #

List of segment options to choose

onTap #

Called with a segment has been tapped

borderRadius #

Radius of the segmented control button (defaults to 10.0)

backgroundColor #

Background color of the button (defaults to Theme.of(context).cardColor)

selectedValue [optional] #

Selected segment value (If none is provided no segment will be selected when tapped).

selectedColor [optional] #

Background color of the selected segment (defaults to Theme.of(context).primaryColor)

2
likes
140
points
161
downloads

Publisher

verified publisherae1.dev

Weekly Downloads

A clean simple segmented control widget that works on all platforms.

Repository (GitHub)

Topics

#ui #widget #button

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on segmented_control_plus