custom_segment_control 1.1.2 copy "custom_segment_control: ^1.1.2" to clipboard
custom_segment_control: ^1.1.2 copied to clipboard

Customizable segment control widget that allows users to toggle between various options. The widget supports various customization options including text, colors, font size, animations, and background [...]

This Flutter package provides a customizable segment control widget that allows users to toggle between two options. The widget supports various customization options including text, colors, font size, animations, and background images for each segment. It also includes drag gestures for seamless interaction and is ideal for scenarios requiring a binary choice, such as switching between two modes or options.

Features #

Screenshot 2024-08-25 at 1 57 01 PM

ScreenRecording2024-08-25at1 06 25AM-ezgif com-crop

  • Customizable Appearance: Adjust text, font size, font weight, colors, and background images for both options.
  • Smooth Animations: Built-in animations with customizable curves and durations.
  • Interactive Drag Gestures: Users can switch between options with swipe gestures.
  • Configurable Shadow and Borders: Add custom shadows and borders to match your app’s design.
  • Flexible Integration: Easily integrate into any Flutter project with support for state management.

Getting started #

To use this package, add custom_segment_control as a dependency in your pubspec.yaml file.

dependencies:
  custom_segment_control: ^1.0.0

Then, run flutter pub get to install the package.

Usage #

CustomSegmentControl(
  option1Text: 'Free',
  option2Text: 'Pro',
  onOptionChange: (isProMode) {
    setState(() {
      _pro = isProMode;
    });
  },
  option1SelectedColor: Colors.blue,
  option2SelectedColor: Colors.green,
  fontSize: 16,
  fontWeight: FontWeight.bold,
),

Additional information #

If you encounter any issues, feel free to open an issue on the GitHub repository.

Contributions are welcome! Whether it's reporting bugs, suggesting features, or submitting a pull request, your input is appreciated.

For further details or support, you can reach out to the package authors via the repository or through the contact information provided.

Happy coding! 🚀

custom_segment_control #

2
likes
130
points
33
downloads

Publisher

verified publisherpingdaksh.com

Weekly Downloads

Customizable segment control widget that allows users to toggle between various options. The widget supports various customization options including text, colors, font size, animations, and background images for each segment. It also includes drag gestures for seamless interaction and is ideal for scenarios requiring a binary choice, such as switching between two modes or options.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on custom_segment_control