morse 0.1.4+1 copy "morse: ^0.1.4+1" to clipboard
morse: ^0.1.4+1 copied to clipboard

discontinued

A simple library that converts morse code to regular strings and encode strings to morse code.

example/example.dart

import 'package:morse/morse.dart';

main() {
  ////////////
  // METHOD //
  ////////////
  // Decode morse
  final decodeMorse =
      Morse().decode('.... . .-.. .-.. --- / .-- --- .-. .-.. -..');
  print(decodeMorse); // hello world

  // Encode morse
  final encodeMorse = Morse().encode('Hello World');
  print(encodeMorse); // .... . .-.. .-.. --- / .-- --- .-. .-.. -..

  /////////////////
  // CONSTRUCTOR //
  /////////////////
  // Decode morse
  final helloEncoded = new Morse('... --- ...');
  final decoded = helloEncoded.decode();
  print(decoded); // sos

  // Encode morse
  final helloWorld = new Morse('SOS');
  final encoded = helloWorld.encode();
  print(encoded); // ... --- ...
}
4
likes
25
pub points
34%
popularity

Publisher

unverified uploader

A simple library that converts morse code to regular strings and encode strings to morse code.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on morse