Check out example codes for "flutter replace character in string". It will help you in understanding the concepts better.

Code Example 1

newString = 'resume';
newString.replaceAll('e', 'é'); // it returns the string   'résumé'

// And you can use a regex to search like a needle in a haystack:
'resume'.replaceAll(RegExp(r'e'), ‘é’); // 'résumé'

Learn ReactJs, React Native from akashmittal.com