parse static method

TrrigerDate parse(
  1. String timeString
)
override

Implementation

static TrrigerDate parse(String timeString) {
  final datetime=DateTime.tryParse(timeString);
  if(datetime == null){
    throw 'Invalid format for RelativeTime string: $timeString';
  }else{
    return TrrigerDate(datetime);
  }
}