custom_picker 0.0.4
custom_picker: ^0.0.4 copied to clipboard

A Flutter Package that provides you an beautified alternative of Dropdown widget.

custom_dropdown #

A Flutter Package that provides you an beautified alternative of Dropdown widget. It is highly Customisable in terms of size, color, style, etc.

Import #

dependencies:
  custom_picker: <latest_version>

Output #

custom_picker

Usage #

You can use multiple text beautification options with detected text formats.

CustomPicker(
  // deciding list whether to show loop over popup items
  optionLoop: [false, false],
  // give popup height
  popupHeight: 200,
  // where to show popupmenu
  below: false,
  // give where to place popup vertically
  verticalOffset: 10,
  // hanfle all changes here
  handleChange: (list) {
    print(list);
  },
  // to include yes no dialog or not
  yesNo: true,
  //give color to popup selected option
  popUpSelColor: Colors.black.withAlpha(150),
  // customize text style for each popUp list
  popUpTextStyle: const [
    TextStyle(color: Colors.white, fontSize: 20),
    TextStyle(color: Colors.white, fontSize: 20),
  ],
  // customize text style for each list
  widTextStyle: const [
    TextStyle(color: Colors.black, fontSize: 18),
    TextStyle(color: Colors.black, fontSize: 18),
  ],
  // customize divider color
  divColor: Colors.black,
  //give a decoration to your popupmenu
  popUpDecoration: BoxDecoration(
      color: Colors.black.withAlpha(100),
      borderRadius: BorderRadius.circular(10)),
  // decorate your picker widget
  widDecoration: BoxDecoration(
    border: Border.all(width: 2, color: Colors.black),
    borderRadius: BorderRadius.circular(10),
  ),
  // input all list you want to display in popupmenu
  list: const [
    ['1', '2', '3', '4', '5', '6'],
    ['one', 'two', 'three']
  ],
  // control flex property of picker children
  wtList: [3, 1],
  // callback that'll be call when option of YesNo dialog is clicked
  onChanged: (List<int> value) {
    print(value);
  },
  //give initial selected item indicies
  selected: const [0, 1],
)
       

Parameters #

parameterdescriptiondefault
popupHeightThe height of the popup400
optionLoopList of boolswhich child to loop over wheeltrue for all children
belowshow popup widget below the widgetColor(0xFF424242)
popUpDecorationThe FontWeight of UnDetected Textradius : 10, border: Color(0xFF424242)
verticalOffsetvertical position of popup widgetTextAlign.start
selectedinitially selected listrequired
yesNowhether to show YesNo dialogfalse
popUpTextStyleadd TextStyle of popup childrenTextStyle(fontSize: 17)
widTextStyleadd TextStyles of Picker ChildrenTextStyle()
onChangedWhenever the current date is changed. If this is null, the picker is considered disabledrequired
handleChangeany change in any child will call this methodvoid
popUpMarginMargin for PopUp Widget (if it is zero, pop up widget will be visible at the center of picker)hor = 20 , ver =20
onCancelWhenever the user cancels when changing the date.void
listList of Lists of Options to be displayed on pop up widgetrequired
wtListList flex propertry of visible widget itemsequal for each child
contentPaddingThe padding of the picker widgetzero
widDecorationBoxDecoration for visible widgetBoxDecoration()
childDecorationBoxDecoration for visible widget's childdefault TextStyle
widHeightheight for visible widget40
divColorDivider Color for visible WidgetColor(0xFF424242)
popUpSelColorPopUp Selected Item ColorColors.white
2
likes
130
pub points
45%
popularity

A Flutter Package that provides you an beautified alternative of Dropdown widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL 3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on custom_picker