toCountingNumber static method

int toCountingNumber(
  1. Iterable? iterable
)

Converts a list to a counting number.

Example: 1, 2, 3 -> 3

Implementation

static int toCountingNumber(Iterable? iterable) {
  return iterable != null && iterable.isNotEmpty ? iterable.length : 0;
}