encodeAssetKey static method

String encodeAssetKey(
  1. String uri
)

Implementation

static String encodeAssetKey(String uri) {
  String key = uri.split(_kAssetScheme).last;
  if (key.startsWith('/')) {
    key = key.substring(1);
  }
  // https://github.com/media-kit/media-kit/issues/121
  return key.split('/').map((e) => Uri.encodeComponent(e)).join('/');
}