isByteLength method

bool isByteLength(
  1. int min, [
  2. int? max
])

Check if the string's length (in bytes) falls in a range.

Implementation

bool isByteLength(int min, [int? max]) => length >= min && (max == null || length <= max);