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

A slider that mimics the behavior of camera app zoom sliders. You can fine-tune the behaviour and output

Zoom Slider #

A customizable Flutter slider widget that mimics the behavior of camera app sliders, with support for both bounded and unbounded values.

Features #

  • Smooth, infinite-feeling scrolling
  • Optional minimum and maximum values
  • Customizable sensitivity and appearance
  • Visual feedback with vertical lines
  • Center indicator
  • Bounce-back animation when reaching bounds
  • Value display with custom formatting
  • Haptic feedback support

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  zoom_slider: ^1.0.0

Usage #

// Basic usage with bounds
ZoomSlider(
  minValue: -100,
  maxValue: 100,
  initialValue: 0,
  onChanged: (update) {
    print('Current value: ${update.value}');
  },
)

// Unbounded usage
ZoomSlider(
  onChanged: (update) {
    print('Current value: ${update.value}');
  },
)

// Customized appearance
ZoomSlider(
  minValue: 0,
  maxValue: 1000,
  initialValue: 500,
  sensitivity: 0.8,
  numberOfLines: 30,
  lineColor: Colors.grey,
  centerLineColor: Colors.blue,
  height: 120,
  valueFormatter: (value) => '${value.round()}°',
  onChanged: (update) {
    print('Current value: ${update.value}');
  },
)
0
likes
140
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A slider that mimics the behavior of camera app zoom sliders. You can fine-tune the behaviour and output

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on zoom_slider