Skip to content
On this page

WheelPicker

A wheel-style control for selecting an item.

WheelPicker in FluttyUIWheelPicker in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

WheelPicker

const WheelPicker({
  super.key,
  required List<String> this._items,
  this.selectedIndex,
  this.size,
  this.initialIndex = 0,
  this.onChanged,
  this.height,
  this.itemExtent,
  this.enabled = true,
  this.haptics = true,
  this.isInfinity = false,
  this.semanticLabel,
  this.backgroundColor,
  this.selectionColor,
  this.textColor,
  this.unselectedTextColor,
  this.textStyle,
  this.borderRadius,
  this.showSelectionOverlay = true,
  this.selectionOverlay,
  this.animationDuration,
});
ParameterTypeRequiredDefault
keyKey?Nonull
selectedIndexint?Nonull
sizeComponentSize?Nonull
initialIndexintNo0
onChangedValueChanged<int>?Nonull
heightdouble?Nonull
itemExtentdouble?Nonull
enabledboolNotrue
hapticsboolNotrue
isInfinityboolNofalse
semanticLabelString?Nonull
backgroundColorColor?Nonull
selectionColorColor?Nonull
textColorColor?Nonull
unselectedTextColorColor?Nonull
textStyleTextStyle?Nonull
borderRadiusdouble?Nonull
showSelectionOverlayboolNotrue
selectionOverlayWidget?Nonull
animationDurationDuration?Nonull

WheelPicker.builder

const WheelPicker.builder({
  super.key,
  required int itemCount,
  required IndexedWidgetBuilder this.itemBuilder,
  this.semanticLabelBuilder,
  this.selectedIndex,
  this.size,
  this.initialIndex = 0,
  this.onChanged,
  this.height,
  this.itemExtent,
  this.enabled = true,
  this.haptics = true,
  this.isInfinity = false,
  this.semanticLabel,
  this.backgroundColor,
  this.selectionColor,
  this.textColor,
  this.unselectedTextColor,
  this.textStyle,
  this.borderRadius,
  this.showSelectionOverlay = true,
  this.selectionOverlay,
  this.animationDuration,
});

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/controls/wheel_picker/wheel_picker.dart

This reference is generated from the WheelPicker declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI