relativePathFromAbsolute method

String relativePathFromAbsolute(
  1. String absolutePath
)

Implementation

String relativePathFromAbsolute(String absolutePath) {
  final segments = absolutePath.split(
    RegExp('^$rootPath/'),
  );

  if (segments.length < 2) {
    return '';
  }

  return segments[1];
}