Returns last character.
String? lastString(String s) { if (s.isEmpty) { return null; } return s.substring(s.length - 1, s.length); }