Rune typedef

Rune = int

A Rune is a Unicode code point, such as a, or 💡.

The recommended way to obtain a Rune is to create it from a String, which is conceptually a sequence of Runes. For example, 'a'.runes.first is equal to the Rune a.

Dart does not have a character/rune literal (https://github.com/dart-lang/language/issues/886), so integer literals need to be used. For example the Unicode code point U+1F4A1, 💡, can be represented by 0x1F4A1.

A String can be constructed from a Rune using (the confusingly named) String.fromCharCode.

Implementation

typedef Rune = int;