Formatter constructor

Formatter(
  1. FileSystemEntity entity,
  2. FileStat stat,
  3. String extra,
  4. String action, {
  5. bool ok = false,
  6. List<FormatField> shows = const [],
  7. String delimiter = r' ',
  8. StatTimeType statTimeType = StatTimeType.modified,
})

Implementation

Formatter(
  this.entity,
  this.stat,
  this.extra,
  this.action, {
  this.ok = false,
  this.shows = const [],
  this.delimiter = r' ',
  this.statTimeType = StatTimeType.modified,
}) {
  if (shows.contains(FormatField.ok)) showOk = true;
  if (shows.contains(FormatField.action)) showAction = true;
  if (shows.contains(FormatField.type)) showType = true;
  if (shows.contains(FormatField.mime)) showMime = true;
  if (shows.contains(FormatField.perm)) showModes = true;
  if (shows.contains(FormatField.time)) showTime = true;
  if (shows.contains(FormatField.size)) showSize = true;
  if (shows.contains(FormatField.extra)) showExtra = true;
}