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

Wheel-shaped picker widget for Flutter. Scroll and select items with customizable header, overlays, magnifier and 3D effects, disabled items, looping, and custom item builders.

Pub Version GitHub GitHub GitHub

Wheel-shaped picker widget for Flutter. Scroll and select items with customizable header, overlays, magnifier and 3D effects, disabled items, looping, and custom item builders.

Demo: https://davigmacode.github.io/flutter_wheel_choice

Features #

  • Customizable wheel/slot-style picker (WheelChoice<T>)
  • Optional header (WheelHeader) aligned with the wheel viewport
  • Overlays to highlight selection (outlined or filled via WheelOverlay)
  • 3D look and magnifier (WheelEffect) with tunable perspective and diameter
  • Item builder and label resolver (WheelItem.delegate, itemLabel)
  • Disable items and optionally loop the list (itemDisabled, loop)
  • Programmatic control with FixedExtentScrollController
  • Adaptive height with expanded and itemVisible

Installation #

flutter pub add wheel_choice

Import:

import 'package:wheel_choice/wheel_choice.dart';

Quick start #

final picker = WheelChoice<String>(
  options: const ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  value: 'Wed',
  onChanged: (v) => debugPrint('Selected: $v'),
  itemVisible: 5, // should be odd
  header: const WheelHeader(child: Text('Day')),
  overlay: WheelOverlay.outlined(inset: 12),
  effect: const WheelEffect(useMagnifier: true, magnification: 1.1),
);

Examples #

This package ships with a runnable example that demonstrates:

  • Basic day picker with header and magnifier
  • Numeric minutes picker (only multiples of 5) with loop and filled overlay
  • Custom item builder with icons and expanded layout

Run locally:

cd example
flutter run

On desktop/web, enable mouse-drag scrolling by setting a ScrollBehavior:

MaterialApp(
  scrollBehavior: const MaterialScrollBehavior().copyWith(
    dragDevices: {
      PointerDeviceKind.touch,
      PointerDeviceKind.mouse,
      PointerDeviceKind.stylus,
      PointerDeviceKind.trackpad,
    },
  ),
  // ...
)

API Reference #

See full docs on pub.flutter-io.cn: https://pub.flutter-io.cn/documentation/wheel_choice/latest/

Key exports:

  • WheelChoice<T> — the main widget
  • WheelHeader — header above the viewport
  • WheelOverlay — selection overlays (outlined/filled)
  • WheelEffect — magnifier, perspective, diameter, opacity, squeeze
  • WheelItem.delegate — default item renderer

Changelog #

See CHANGELOG.md.

License #

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

Sponsoring #

Buy Me A Coffee Ko-Fi

If this package or any other package I created is helping you, please consider to sponsor me so that I can take time to read the issues, fix bugs, merge pull requests and add features to these packages.

6
likes
0
points
13
downloads

Publisher

verified publisherwidgetarian.com

Weekly Downloads

Wheel-shaped picker widget for Flutter. Scroll and select items with customizable header, overlays, magnifier and 3D effects, disabled items, looping, and custom item builders.

Homepage
Repository (GitHub)
View/report issues

Topics

#wheel #scroll #choice #picker

Funding

Consider supporting this project:

buymeacoffee.com
ko-fi.com

License

unknown (license)

Dependencies

flutter

More

Packages that depend on wheel_choice