trimAll property

String trimAll
  String sample ='what is \n your name';
  print(sample); \\ whatisyourname

Remove all whitespace & newline inside string

Implementation

String get trimAll => replaceAll(RegExp(r'[ |\\n]+'), '');