textToMorse function

String textToMorse(
  1. String text
)

Implementation

String textToMorse(String text) {
  return text.toUpperCase().split('').map((char) => _morseCodeMap[char] ?? '').join(' ');
}