macos_secure_bookmarks 0.1.0+1

  • Readme
  • Changelog
  • Example
  • Installing
  • new81

macos_secure_bookmarks #

Pub

Flutter plugin to create secure bookmarks to keep access to files in sandboxed apps.

Usage #

Creating Security Scoped Bookmarks #

// First let the user choose a file, e.g. using the file chooser plugin.

showOpenPanel((result, files) {
  if (result != FileChooserResult.ok || files.isEmpty) {
    return;
  }
  
  // Now create a security scoped bookmark
  final secureBookmarks = SecureBookmarks();
  final bookmark = await _secureBookmarks.bookmark(File(_file));
  
  // Now store the bookmark somewhere for later invocations
});

Resolving and accessing bookmarks #

// resolve bookmark from persistet 'bookmark' string from earlier
final resolvedFile = await _secureBookmarks.resolveBookmark(_bookmark);
// resolved is now a File object, but before accessing it, call:
await startAccessingSecurityScopedResource(resolvedFile);

// now read/write the file

// and later give up access.
await stopAccessingSecurityScopedResource(resolvedFile);

0.1.0+1 #

  • Added noop modules for ios/android so the builds run.

0.1.0 - 2019-09-14 #

0.0.1 #

  • Initial release 🎉️

example/README.md

Example for macos_secure_bookmarks #

see readme of the plugin for details.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  macos_secure_bookmarks: ^0.1.0+1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:macos_secure_bookmarks/macos_secure_bookmarks.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
62
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
81
Learn more about scoring.

We analyzed this package on Oct 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
logging >=0.10.0 <1.0.0 0.11.3+2
logging_appenders >=0.2.0 <1.0.0 0.2.2
Transitive dependencies
charcode 1.1.2
clock 1.0.1
collection 1.14.11 1.14.12
cookie_jar 1.0.1
dio 2.2.2 3.0.3
intl 0.16.0
io 0.3.3
meta 1.1.7
path 1.6.4
rxdart 0.22.3
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8