toCountingWithPlus static method

String toCountingWithPlus(
  1. int size,
  2. int limit
)

Converts a size and limit to a formatted string with a plus sign if size is greater than limit.

Example: (8, 5) -> '5+'

Implementation

static String toCountingWithPlus(int size, int limit) =>
    size > limit ? "$limit+" : "$size";