Skip to main content

segmented_pill_control 1.0.0 copy "segmented_pill_control: ^1.0.0" to clipboard
segmented_pill_control: ^1.0.0 copied to clipboard

A fluid sliding segmented pill control with spring animations, badge indicators, custom styling, and haptics.

segmented_pill_control #

A fluid sliding segmented pill control for Flutter with spring animations, badge indicators, custom styling, and haptic feedback.

pub package License: MIT


โœจ Features #

  • ๐Ÿ Apple-Grade Sliding Animation: Fluid sliding pill background with spring physics.
  • ๐Ÿ”ด Badge Counters & Status Dots: Built-in support for numeric badges and notification dot indicators on individual segments.
  • ๐ŸŽจ Deeply Customizable Theme: Easily configure background colors, pill elevation, border radii, text styles, and shadows.
  • ๐Ÿ“ณ Haptic Feedback: Crisp tactile feedback (HapticFeedback.selectionClick()) when switching segments.
  • ๐ŸŽ›๏ธ Programmatic Controller: Navigate tabs from code using SegmentedPillController.
  • ๐Ÿงน Zero External Dependencies: Pure Flutter SDK implementation.

๐Ÿš€ Getting Started #

Add segmented_pill_control to your pubspec.yaml:

dependencies:
  segmented_pill_control: ^1.0.0

Import the package:

import 'package:segmented_pill_control/segmented_pill_control.dart';

๐Ÿ’ก Quick Example #

SegmentedPillControl(
  initialIndex: 0,
  onChanged: (index) => print('Selected: $index'),
  segments: const [
    PillSegment(
      label: 'Inbox',
      icon: Icon(Icons.inbox),
      badgeCount: 5,
    ),
    PillSegment(
      label: 'Starred',
      icon: Icon(Icons.star),
      showBadgeDot: true,
    ),
    PillSegment(
      label: 'Archive',
      icon: Icon(Icons.archive),
    ),
  ],
)

๐Ÿ“„ License #

This project is licensed under the MIT License - see the LICENSE file for details.

Author #

Created by Shahzain Baloch.

1
likes
160
points
305
downloads

Documentation

API reference

Publisher

verified publisherbalochcodes.com

Weekly Downloads

A fluid sliding segmented pill control with spring animations, badge indicators, custom styling, and haptics.

Repository (GitHub)
View/report issues

Topics

#ui #tabs #segmented-control #pill #animation

License

MIT (license)

Dependencies

flutter

More

Packages that depend on segmented_pill_control