name method

String name(
  1. String? resourcePath
)

Implementation

String name(String? resourcePath) {
  if (resourcePath?.isEmpty ?? true) {
    return '';
  }

  final pathSegments = resourcePath!.split('/');
  return pathSegments.last.trim();
}