parse static method
Implementation
static Trriger parse(String timeString) {
final datetime = DateTime.tryParse(timeString);
if (datetime == null) {
try {
return TrrigerDuration(Heplers.triggerToDuration(timeString));
} catch (e) {
throw 'Invalid format for RelativeTime string: $timeString';
}
} else {
return TrrigerDate(datetime);
}
}