from<T> static method

Scale? from<T>(
  1. Iterable? list
)

Implementation

static Scale? from<T>(Iterable? list) {
  if (list == null || list.isEmpty) return null;

  var sorted = list.toList();
  sorted.sort();
  return Scale(sorted[0], sorted[sorted.length - 1]);
}