toTime function

TimeOfDay? toTime(
  1. dynamic value, {
  2. String? format,
})

Implementation

TimeOfDay? toTime(dynamic value, {String? format}) {

  TimeOfDay? time;
  try
  {
    time = TimeOfDay.fromDateTime(toDate(value, format: format)!);
  }
  catch(e) {
    return null;
  }
  return time;
}