darwin_url 0.1.0 copy "darwin_url: ^0.1.0" to clipboard
darwin_url: ^0.1.0 copied to clipboard

Helper functions for Swift `URL`/ Objc `NSURL`.

darwin_url #

Helper functions for Swift URL/ Objc NSURL.

Usage #

final _darwinUrlPlugin = DarwinUrl();

// Get tmp directory URL.
final tmpDir = await _darwinUrlPlugin.tmpDir();
// file:/|/private/var/mobile/Containers/Data/Application/OC5E3F85-BB5A-4501-8C22-C1DC19412F10/tmp/

// Append a path component to a URL.
final joinResult =
  await _darwinUrlPlugin.append(tmpDir, 'foo/bar/一二三', isDir: true);
// file:/l/private/var/mobile/Containers/Data/ Application/OC5E3F85-BB5A-4501-8C22-C1DC19412F10/tmp/foo/bar/%E4%B8%80%E4%BA%8C%E4%B8%891

// Convert a file path to a URL.
final filePathToUrlResult =
  await _darwinUrlPlugin.filePathToUrl(Directory.systemTemp.path);
1
likes
0
points
31
downloads

Publisher

verified publisherflutter-cavalry.com

Weekly Downloads

Helper functions for Swift `URL`/ Objc `NSURL`.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on darwin_url