getFilename method Null safety

String? getFilename()

Returns the simple filename of the icon url (without the full path).

Implementation

@protected
String? getFilename() {
  if (iconUrl == null) {
    return null;
  }
  final int position = iconUrl!.lastIndexOf('/');
  if (position == -1) {
    return null;
  }
  return iconUrl!.substring(position + 1);
}