FieldStylePicker class
FieldStylePicker is used to define the style for a picker field.
Style configuration for picker fields that display selection options in a modal.
Extends FieldStyle with picker-specific styling options including bottom modal sheet appearance and behavior. Used for fields that present a list of options for user selection.
- Inheritance
-
- Object
- FieldStyle
- FieldStylePicker
Constructors
- FieldStylePicker({BottomModalSheetStyle? bottomModalSheetStyle, PickerListTileStyle? listTileStyle, InputDecoration? decoration, Widget? prefixIcon, double containerHeight = 50.0, EdgeInsets containerPadding = const EdgeInsets.symmetric(horizontal: 13, vertical: 13), BorderRadius containerBorderRadius = const BorderRadius.all(Radius.circular(12)), NyColor? containerColor, TextStyle? selectedValueTextStyle, TextStyle? fieldNameTextStyle, TextStyle? placeholderTextStyle, String? placeholderPrefix, IconData dropdownIcon = Icons.arrow_drop_down, NyColor? dropdownIconColor, double bottomSheetHeightFactor = 0.5, BorderRadius bottomSheetBorderRadius = const BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)), EdgeInsets bottomSheetPadding = const EdgeInsets.symmetric(vertical: 20, horizontal: 20), NyColor? bottomSheetDividerColor, @Deprecated(_pickerLayoutDeprecation) double placeholderGap = 10.0, @Deprecated(_pickerLayoutDeprecation) double widthBreakpoint = 200.0, @Deprecated(_pickerLayoutDeprecation) MainAxisAlignment? placeholderAlignment, Alignment? selectedValueAlignment = Alignment.centerLeft, @Deprecated(_pickerLayoutDeprecation) EdgeInsets? selectedValuePadding = const EdgeInsets.only(top: 10), double? headerSpacing = 5.0, })
Properties
- bottomModalSheetStyle ↔ BottomModalSheetStyle?
-
getter/setter pair
- bottomSheetBorderRadius → BorderRadius
-
Border radius for the bottom sheet
final
- bottomSheetDividerColor → NyColor?
-
Divider color in the bottom sheet list (light/dark)
final
- bottomSheetHeightFactor → double
-
Height factor for the bottom sheet (fraction of screen height)
final
- bottomSheetPadding → EdgeInsets
-
Padding inside the bottom sheet
final
- containerBorderRadius → BorderRadius
-
Border radius of the picker
final
- containerColor → NyColor?
-
Background color of the picker (light/dark)
final
- containerHeight → double
-
Minimum height of the picker; it grows to fit its label and choice
final
- containerPadding → EdgeInsets
-
Padding inside the picker, used as its
contentPaddingfinal - decoration → InputDecoration?
-
Replaces the picker's InputDecoration, the same way
FieldStyleDateTimePicker.decorationdoes for a date field.final - dropdownIcon → IconData
-
Icon displayed in the dropdown
final
- dropdownIconColor → NyColor?
-
Color of the dropdown icon (light/dark)
final
- fieldNameTextStyle → TextStyle?
-
Text style for the field name once it floats above a chosen option
final
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerSpacing ↔ double?
-
getter/setter pairinherited
- listTileStyle → PickerListTileStyle?
-
Style for individual list tiles in the picker bottom sheet.
final
- placeholderAlignment → MainAxisAlignment?
-
Alignment of the placeholder/selected-value row
final
- placeholderGap → double
-
Gap between placeholder text and dropdown icon
final
- placeholderPrefix → String?
-
Prefix text for the placeholder (default "Select")
final
- placeholderTextStyle → TextStyle?
-
Text style for the label, "Select" and the field name, before an option
is chosen
final
- prefixIcon → Widget?
-
Widget shown before the label, like a text field's
prefixIcon.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedValueAlignment → Alignment?
-
Horizontal alignment of the chosen option's text.
final
- selectedValuePadding → EdgeInsets?
-
Padding around the selected value text.
final
- selectedValueTextStyle → TextStyle?
-
Text style for the chosen option
final
- widthBreakpoint → double
-
Width breakpoint for switching between compact and full layout
final
Methods
-
copyWith(
{BottomModalSheetStyle? bottomModalSheetStyle, PickerListTileStyle? listTileStyle, InputDecoration? decoration, Widget? prefixIcon, double? containerHeight, EdgeInsets? containerPadding, BorderRadius? containerBorderRadius, NyColor? containerColor, TextStyle? selectedValueTextStyle, TextStyle? fieldNameTextStyle, TextStyle? placeholderTextStyle, String? placeholderPrefix, IconData? dropdownIcon, NyColor? dropdownIconColor, double? bottomSheetHeightFactor, BorderRadius? bottomSheetBorderRadius, EdgeInsets? bottomSheetPadding, NyColor? bottomSheetDividerColor, double? placeholderGap, double? widthBreakpoint, MainAxisAlignment? placeholderAlignment, Alignment? selectedValueAlignment, EdgeInsets? selectedValuePadding, double? headerSpacing, }) → FieldStylePicker -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited