trim property
Rejects leading and trailing whitespace while allowing spaces within the value.
Use this on fields where internal spaces are valid but accidental padding is not, such as full-name or address inputs.
Implementation
static TextInputFormatter get trim => FilteringTextInputFormatter.deny(RegExp(r'^\s|\s$'));