ThemedDateTimePicker class
Constructors
-
ThemedDateTimePicker.new({Key? key, DateTime? value, void onChanged(DateTime)?, String? labelText, Widget? label, String? placeholder, String? prefixText, IconData? prefixIcon, Widget? prefixWidget, VoidCallback? onPrefixTap, Widget? customChild, bool disabled = false, Map<String, String> translations = const {'actions.cancel' : 'Cancel', 'actions.save' : 'Save', 'layrz.monthPicker.year' : 'Year {year}', 'layrz.monthPicker.back' : 'Previous year', 'layrz.monthPicker.next' : 'Next year', 'layrz.datetimePicker.date' : 'Date', 'layrz.datetimePicker.time' : 'Time', 'layrz.timePicker.hours' : 'Hours', 'layrz.timePicker.minutes' : 'Minutes', 'layrz.calendar.month.back' : 'Previous month', 'layrz.calendar.month.next' : 'Next month', 'layrz.calendar.today' : 'Today', 'layrz.calendar.month' : 'View as month', 'layrz.calendar.pickMonth' : 'Pick a month'}, bool overridesLayrzTranslations = false, List<DateTime> disabledDays = const [], String datePattern = '%Y-%m-%d', String? timePattern, bool use24HourFormat = false, String patternSeparator = ' ', Color hoverColor = Colors.transparent, Color focusColor = Colors.transparent, Color splashColor = Colors.transparent, Color highlightColor = Colors.transparent, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), List<String> errors = const [], bool hideDetails = false, EdgeInsets? padding})
-
ThemedDateTimePicker is a date time picker input. It is a wrapper of ThemedTextInput with a date time picker.
const
Properties
-
borderRadius
→ BorderRadius
-
borderRadius is the border radius of the input. Only will affect when customChild is submitted.
By default, it will use
BorderRadius.circular(10)
.
final
-
customChild
→ Widget?
-
customChild is the custom child of the input.
If it is submitted, the input will be ignored.
final
-
datePattern
→ String
-
datePattern is the date pattern of the date. By default is
%Y-%m-%d
.
final
-
disabled
→ bool
-
disabled is the disabled state of the input.
final
-
disabledDays
→ List<DateTime>
-
disabledMonths
is the list of disabled months.
final
-
errors
→ List<String>
-
errors is the list of errors of the input.
final
-
focusColor
→ Color
-
focusColor is the focus color of the input. Only will affect when customChild is submitted.
By default, it will use
Colors.transparent
.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
hideDetails
→ bool
-
hideDetails is the state of hiding the details of the input.
final
-
highlightColor
→ Color
-
highlightColor is the highlight color of the input. Only will affect when customChild is submitted.
By default, it will use
Colors.transparent
.
final
-
hoverColor
→ Color
-
hoverColor is the hover color of the input. Only will affect when customChild is submitted.
By default, it will use
Colors.transparent
.
final
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
label
→ Widget?
-
label is the label widget of the input. Avoid submit label and labelText at the same time.
final
-
labelText
→ String?
-
labelText is the label text of the input. Avoid submit label and labelText at the same time.
final
-
onChanged
→ void Function(DateTime)?
-
onChanged is the callback function when the input is changed.
final
-
onPrefixTap
→ VoidCallback?
-
onPrefixTap is the callback function when the prefix is tapped.
final
-
overridesLayrzTranslations
→ bool
-
overridesLayrzTranslations is the flag to override the default translations of Layrz.
final
-
padding
→ EdgeInsets?
-
emptyListText
is the text to be displayed when the list is empty.
final
-
patternSeparator
→ String
-
patternSeparator is the separator between date and time. By default is
(space).
final
-
placeholder
→ String?
-
placeholder is the placeholder of the input.
final
-
prefixIcon
→ IconData?
-
prefixIcon is the prefix icon of the input. Avoid submit prefixIcon and prefixWidget at the same time.
final
-
prefixText
→ String?
-
prefixText is the prefix text of the input.
final
-
prefixWidget
→ Widget?
-
prefixWidget is the prefix widget of the input. Avoid submit prefixIcon and prefixWidget at the same time.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
splashColor
→ Color
-
splashColor is the splash color of the input. Only will affect when customChild is submitted.
By default, it will use
Colors.transparent
.
final
-
timePattern
→ String?
-
timePattern is the time pattern of the date. By default, depending of use24HourFormat we use
%I:%M %p
or %H:%M
. If timePattern is submitted, this will be used instead of the default.
final
-
translations
→ Map<String, String>
-
translations is the translations of the input. By default we use
LayrzAppLocalizations
for translations,
but you can submit your own translations using this property. Consider when LayrzAppLocalizations
is present,
is the default value of this property.
Required translations:
final
-
use24HourFormat
→ bool
-
use24HourFormat is the flag to use 24 hour format. By default is false, so it will use 12 hour format.
final
-
value
→ DateTime?
-
value is the value of the input.
final