How to remove all whitespace of a string in Dart? May 4, 2023 by Tarik This would solve your problem String name = "COCA COLA"; print(name.replaceAll(' ', ''));