BottomPicker class

Inheritance
Available extensions

Constructors

BottomPicker({Key? key, required String title, required List<Text>? items, TextStyle titleStyle = const TextStyle(), bool dismissable = false, dynamic onChange(dynamic)?, dynamic onSubmit(dynamic)?, Function? onClose, BottomPickerTheme bottomPickerTheme = BottomPickerTheme.blue, List<Color>? gradientColors, Color iconColor = Colors.white, int selectedItemIndex = 0, String? buttonText, TextStyle? buttonTextStyle, bool displayButtonIcon = true, Color? buttonSingleColor, Color backgroundColor = Colors.white, TextStyle pickerTextStyle = const TextStyle(fontSize: 14, color: Colors.black), double itemExtent = 35.0, bool displayCloseIcon = true, Color closeIconColor = Colors.black, LayoutOrientation layoutOrientation = LayoutOrientation.ltr, MainAxisAlignment buttonAlignement = MainAxisAlignment.center, double? height, bool displaySubmitButton = true})
BottomPicker.date({Key? key, required String title, TextStyle titleStyle = const TextStyle(), bool dismissable = false, dynamic onChange(dynamic)?, dynamic onSubmit(dynamic)?, Function? onClose, BottomPickerTheme bottomPickerTheme = BottomPickerTheme.blue, List<Color>? gradientColors, Color iconColor = Colors.white, DateTime? initialDateTime, DateTime? minDateTime, DateTime? maxDateTime, String? buttonText, TextStyle? buttonTextStyle, bool displayButtonIcon = true, Color? buttonSingleColor, Color backgroundColor = Colors.white, DatePickerDateOrder? dateOrder = DatePickerDateOrder.ymd, TextStyle pickerTextStyle = const TextStyle(fontSize: 14, color: Colors.black), bool displayCloseIcon = true, Color closeIconColor = Colors.black, LayoutOrientation layoutOrientation = LayoutOrientation.ltr, MainAxisAlignment buttonAlignement = MainAxisAlignment.center, double? height, bool displaySubmitButton = true})
BottomPicker.dateTime({Key? key, required String title, TextStyle titleStyle = const TextStyle(), bool dismissable = false, dynamic onChange(dynamic)?, dynamic onSubmit(dynamic)?, Function? onClose, BottomPickerTheme bottomPickerTheme = BottomPickerTheme.blue, List<Color>? gradientColors, Color iconColor = Colors.white, DateTime? initialDateTime, int? minuteInterval, DateTime? minDateTime, DateTime? maxDateTime, bool use24hFormat = false, String? buttonText, TextStyle? buttonTextStyle, bool displayButtonIcon = true, Color? buttonSingleColor, Color backgroundColor = Colors.white, DatePickerDateOrder? dateOrder = DatePickerDateOrder.ymd, TextStyle pickerTextStyle = const TextStyle(fontSize: 14, color: Colors.black), bool displayCloseIcon = true, Color closeIconColor = Colors.black, LayoutOrientation layoutOrientation = LayoutOrientation.ltr, MainAxisAlignment buttonAlignement = MainAxisAlignment.center, double? height, bool displaySubmitButton = true})
BottomPicker.time({Key? key, required String title, TextStyle titleStyle = const TextStyle(), bool dismissable = false, dynamic onChange(dynamic)?, dynamic onSubmit(dynamic)?, Function? onClose, BottomPickerTheme bottomPickerTheme = BottomPickerTheme.blue, List<Color>? gradientColors, Color iconColor = Colors.white, DateTime? initialDateTime, DateTime? minDateTime, DateTime? maxDateTime, bool use24hFormat = false, String? buttonText, TextStyle? buttonTextStyle, bool displayButtonIcon = true, Color? buttonSingleColor, Color backgroundColor = Colors.white, TextStyle pickerTextStyle = const TextStyle(fontSize: 14, color: Colors.black), bool displayCloseIcon = true, Color closeIconColor = Colors.black, LayoutOrientation layoutOrientation = LayoutOrientation.ltr, MainAxisAlignment buttonAlignement = MainAxisAlignment.center, double? height, bool displaySubmitButton = true})

Properties

backgroundColor Color
the bottom picker background color, by default it's white
final
bottomPickerTheme BottomPickerTheme
set the theme of the bottom picker (the button theme) possible values
final
bottomPickerType BottomPickerType
the bottom picker type
getter/setter pair
buttonAlignement MainAxisAlignment
THe alignement of the bottom picker button by default it's MainAxisAlignment.center
final
buttonSingleColor Color?
a single color will be applied to the button instead of the gradient themes
final
buttonText String?
the text that will be applied to the button if the text is null the button will be rendered with an icon
final
buttonTextStyle TextStyle?
the button text style, will be applied on the button's text
final
closeIconColor Color
the close icon color by default closeIconColor = Colors.black
final
dateOrder DatePickerDateOrder?
date order applied on date picker or date time picker by default it's YYYY/MM/DD
getter/setter pair
datePickerMode CupertinoDatePickerMode
The dateTime picker mode CupertinoDatePickerMode.date or CupertinoDatePickerMode.dateAndTime or CupertinoDatePickerMode.time
getter/setter pair
dismissable bool
defines whether the bottom picker is dismissable or not by default it's set to false
final
displayButtonIcon bool
display button icon by default it's true if you want to display a text you can set displayButtonIcon to false
final
displayCloseIcon bool
indicate whether the close icon will be rendred or not by default displayCloseIcon = true
final
displaySubmitButton bool
indicates if the submit button will be displayed or not by default the submit button is shown
final
gradientColors List<Color>?
to set a custom button theme color use this list when it's not null it will be applied
final
hashCode int
The hash code for this object.
no setterinherited
height double?
bottom picker main widget height if it's null the bottom picker will get the height from bottomPickerHeight extension on context
final
iconColor Color
define the icon color on the button by default it's White
final
initialDateTime DateTime?
The initial date time applied on the date and time picker by default it's null
getter/setter pair
itemExtent double
define the picker item extent available only for list items picker by default it's 35
getter/setter pair
items List<Text>?
list of items (List of text) used to create simple item picker (required) and should not be empty or null
getter/setter pair
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layoutOrientation LayoutOrientation
the layout orientation of the bottom picker by default the orientation is set to LTR
final
maxDateTime DateTime?
the max date time on the date picker by default it's null
getter/setter pair
minDateTime DateTime?
the minimum date & time applied on the date picker by default it's null
getter/setter pair
minuteInterval int?
The gap between two minutes by default it's 1 minute
getter/setter pair
onChange → dynamic Function(dynamic)?
Nullable function, invoked when navigating between picker items whether it's date picker or simple item picker it will return a value DateTime or int(index)
final
onClose Function?
Invoked when clicking on the close button
final
onSubmit → dynamic Function(dynamic)?
Nullable function invoked when clicking on submit button if the picker type is date/time/dateTime it will return DateTime value else it will return the index of the selected item
final
pickerTextStyle TextStyle
the picker text style applied on all types of bottom picker by default TextStyle(fontSize: 14)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItemIndex int
used for simple bottom picker by default it's 0, needs to be in the range 0, this.items.length-1 otherwise an exception will be thrown for date and time picker type this parameter is not available
getter/setter pair
title String
The title of the bottom picker it's required for all bottom picker types
final
titleStyle TextStyle
The text style applied on the title by default it applies simple text style
final
use24hFormat bool
define whether the time uses 24h or 12h format by default it's false (12h format)
getter/setter pair

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _BottomPickerState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show(BuildContext context) → void
display the bottom picker popup context the app context to display the popup
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited