countSeconds function

String countSeconds(
  1. int difference
)

Implementation

String countSeconds(int difference) {
  int count = (difference / 1000).truncate();
  return count > 1
      ? count.toString() + ' second'
      : '${"Just now".capitalizeFirstLetter()}';
}