toTimeAgoString method

String? toTimeAgoString({
  1. String? pattern,
  2. String? locale,
})

Implementation

String? toTimeAgoString({String? pattern, String? locale}) {
  if (this == null) {
    NyLogger.dump('DateTime is null', null);
    return null;
  }
  return GetTimeAgo.parse(
    this!,
    locale: locale ?? Nylo.instance.locale,
    pattern: pattern,
  );
}