CustomTimePickerErfan class
A customizable time picker widget for Flutter applications.
This widget provides a highly customizable time picker that supports both scroll wheels and manual text input to select a valid time. It also restricts future times if the selected date is today.
Example:
CustomTimePickerErfan(
initialTime: TimeOfDay.now(),
selectedDate: DateTime.now(),
primaryColor: Colors.blue,
backgroundColor: Colors.white,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CustomTimePickerErfan
Constructors
-
CustomTimePickerErfan({Key? key, required TimeOfDay initialTime, required DateTime selectedDate, Color primaryColor = TimePickerModel.defaultPrimaryColor, Color backgroundColor = TimePickerModel.defaultBackgroundColor, Color textColor = TimePickerModel.defaultTextColor, Color? errorColor, Color? disabledColor, String? confirmText, String? cancelText, String? chooseTimeText, ValueChanged<
DateTime> ? onDateChanged}) -
Creates a customizable time picker widget.
const
Properties
- backgroundColor → Color
-
The background color of the time picker dialog.
final
- cancelText → String?
-
The text to display on the cancel button.
final
- chooseTimeText → String?
-
The text to display as the header/title of the time picker.
final
- confirmText → String?
-
The text to display on the confirm button.
final
- disabledColor → Color?
-
The color used for disabled elements like buttons.
final
- errorColor → Color?
-
The color used to indicate errors in input validation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialTime → TimeOfDay
-
The initial time to display when the picker is first shown.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onDateChanged
→ ValueChanged<
DateTime> ? -
Callback function that is called when the date changes.
final
- primaryColor → Color
-
The primary color used for highlights, headers, and selected values.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedDate → DateTime
-
The selected date context for the time picker.
Used to restrict future times if the date is today.
final
- textColor → Color
-
The color used for text elements throughout the widget.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CustomTimePickerErfan> -
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
-
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, int wrapWidth = 65}) → 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