last method

String? last()

Get last character

Implementation

String? last() {
  if (this == null) {
    return null;
  }
  if (this!.isEmpty) {
    return '';
  }
  return this![this!.length - 1];
}