extractPath static method
Extract path from URL
url - The URL to extract path from
Returns path
Implementation
static String? extractPath(String url) {
try {
final uri = Uri.parse(url);
return uri.path;
} catch (e) {
return null;
}
}