The `last` property in Dart returns the last element of a sequence of Unicode code points.
The syntax of Runes.last property is:
int last
This last property of Runes returns the last element.
Runes.last returns value of type int
.
In this example,
runes
from the string 'Hello'.last
property.void main() {
Runes runes = Runes('Hello');
int lastElement = runes.last;
print('Last element of runes: $lastElement');
}
Last element of runes: 111
In this example,
emojis
from the string '👋🏽🚀🌟'.last
property.void main() {
Runes emojis = Runes('👋🏽🚀🌟');
int lastEmoji = emojis.last;
print('Last emoji: $lastEmoji');
}
Last emoji: 127775
In this Dart tutorial, we learned about last property of Runes: the syntax and few working examples with output and detailed explanation for each example.