TimeField constructor
TimeField({})
Implementation
TimeField(
{Key? key,
this.controller,
this.fontSize,
this.fontColor,
this.maxLength = 8,
this.inputMask = "##:##:##",
this.radius,
this.borderColor,
this.hintText = "HH:mm:ss",
this.enabled = true,
this.showMeridian = false,
this.fillColor,
this.inputStyle})
: super(key: key) {
if (showMeridian == true) {
controller?.addListener(() {
// FIND MERIDIAN
var time = controller?.text.toHourTime();
if (time != null) {
var durationDate = time.convertToDate(date: DateTime.now());
if (durationDate != null) {
var formatted = DateFormat('a').format(durationDate);
_meridianNotifier.value = formatted;
}
} else {
_meridianNotifier.value = "";
}
});
}
}