morse_code 0.1.0

  • Readme
  • Changelog
  • Installing
  • 0

Morse Code #

version MIT License PRs Welcome

Watch on GitHub Star on GitHub

Usage #

Fist depend on the libary by ading this to your package's pubspec.yaml:

  morse_code: ^0.1.0

Now inside your Dart code you can import it.

import 'package:morse_code/morse_code.dart';

For this example we're going to use the following morse code string:

final String encodedMessage = '.... . .-.. .-.. --- / .-- --- .-. .-.. -..';

There are two ways to decode a morse code string. Either provide de encoded string as an argument to the constructor, and call the decode method.

final Morse morse = new Morse(encodedMessage);
String decodedMessage = morse.decode();

// Or combine the two, for more compact code:
String decodedMessage =  new Morse(encodedMessage).decode();

Or provide the encoded string as an argument to the decode method.

final Morse morse = new Morse();
String decodedMessage = morse.decode(encodedMessage);

// Or again combine the two, for more compact code:
String decodedMessage =  new Morse().decode(encodedMessage);

Contributing #

Feel free to open a PR with any suggetions!

[0.1.0] - 16 June 2018 #

Breaking change #


Fixes / Enhancements

  • Initial version of the Morse class.


  • Initial documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  morse_code: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:morse_code/morse_code.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.0.0