squish static method

String squish(
  1. String value
)

Removes all whitespace and collapses internal whitespace into single spaces.

Implementation

static String squish(String value) =>
    value.trim().replaceAll(RegExp(r'\s+'), ' ');