getPathId static method

String getPathId([
  1. String? path
])

Get the path id from the path.

GithubContentModel.getPathId("path/to/file");

Implementation

static String getPathId([String? path]) {
  final encodedPath = Uri.encodeComponent("/${path?.trimString("/") ?? ""}");
  return encodedPath;
}