getTime method
19:02 or 7:02 pm depending on is24Hours
Implementation
String getTime({bool is24Hours = false}) {
return '${is24Hours ? this.hour : this.hour > 12 ? this.hour - 12 : this.hour}:${this.minute}'
'${is24Hours ? '' : this.hour >= 12 ? ' pm' : ' am'}';
}