custom_sliding_segmented_control
2.0.0, released 3 months ago by an unverified publisher
A custom sliding segmented control widget with flexible configuration and animations.
What it does
Allows you to build and customize a sliding segmented control widget with configurable colors, animation duration, curves, sizes, and initial values. It supports custom decorations for both the main panel and the sliding thumb.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a custom segmented control with smooth sliding animations between options.
- You want to style both the background container and the active segment thumb independently using BoxDecoration.
Skip it when
- You require standard platform-native segmented controls without custom styling.
- You need complex navigation routing tied directly to the tabs.
Strengths
- Highly configurable decorations for both container and thumb
- Supports custom animation curves and durations
- Dynamic initial values and size calculations on orientation change
Weaknesses
- Limited documentation on advanced properties beyond the basic README example
- Relies entirely on custom UI implementation rather than native look-and-feel bindings
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
CustomSlidingSegmentedControl<int>(
initialValue: 2,
children: {
1: Text('News daily portal'),
2: Text('Map'),
3: Text('Paper'),
},
decoration: BoxDecoration(
color: CupertinoColors.lightBackgroundGray,
borderRadius: BorderRadius.circular(8),
),
thumbDecoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
),
duration: Duration(milliseconds: 300),
curve: Curves.easeInToLinear,
onValueChanged: (v) {
print(v);
},
)Alternatives
Packages that do the same job and could replace custom_sliding_segmented_control.
- flutter_sliding_toast
Displays customizable sliding and popup toasts with animations, queueing, and stacking modes.
71Compare - parallax_rain
Widget that renders customizable 3D rain effect
75Compare - slideable
Flexible and customizable slideable list item widget for Flutter apps.
62Compare - overlay_tutorial
Displays overlay tutorials with customizable hole shapes and optional hints.
50Compare
Works with
Packages commonly used together with custom_sliding_segmented_control: ones it builds on, ones built on it, and its own family.
- material_uicustom_sliding_segmented_control depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- cupertino_uicustom_sliding_segmented_control depends on itOfficial Flutter Cupertino design library implementing Apple HIG iOS and macOS user interfaces.
- reown_appkitBuilt on custom_sliding_segmented_controlFlutter toolkit for WalletConnect onchain UX