material_segmented_control
5.0.1, released 3 years ago by an unverified publisher
Material style segmented control widget for Flutter.
WASM-ready
What it does
Provides a single‑purpose segmented control that follows Material design. Allows custom colors, text styles, border radius, and disabling of individual segments. Emits the tapped index via a callback.
AI-written summary of version 5.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a Material‑styled segmented control UI component.
- You want easy customization of colors, borders, and disabled segments.
Skip it when
- You require iOS‑style Cupertino segmented control.
- You need a full widget library rather than a single control.
Strengths
- Simple API and easy to drop into existing code.
- Highly customizable appearance and disabled‑segment support.
Weaknesses
- Only provides a segmented control, no other UI components.
- Limited animation or advanced interaction features.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
int _current = 0;
MaterialSegmentedControl(
children: {0: Text('A'), 1: Text('B')},
selectionIndex: _current,
onSegmentTapped: (i) => setState(() => _current = i),
);Alternatives
Packages that do the same job and could replace material_segmented_control.
- material_ui
Offers a broader collection of Material widgets, including similar controls, reducing the need for a dedicated package.
94Compare