parent method

String parent(
  1. String? resourcePath
)

Implementation

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

  final pathSegments = resourcePath!.split('/');
  pathSegments.removeLast();

  return pathSegments.join('/');
}