how to trim spaces in a string in dart code example Example: remove space from string dart String name = "COCA COLA"; print(name.replaceAll(' ', ''))