content_resolver
0.3.6, released a year ago by espresso3389.jp
Plugin to read and write Android content URIs.
What it does
Provides a simple API to resolve content URIs to a Content object and write data back to a content URI on Android. It handles platform-specific quirks such as non‑Dart Uri parsing.
AI-written summary of version 0.3.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need to access files via Android content URIs (e.g., from intent data or app links).
- Want to write data to a content URI that is writable by the target provider.
Skip it when
- Targeting iOS, web, or other platforms; the plugin only works on Android.
Strengths
- Simple, single‑method API for resolving and writing content.
- Handles edge cases like non‑Dart Uri parsing and Android 16‑KB page size support.
- No build_runner or code generation required.
- MIT license.
Weaknesses
- Android‑only; no support for other platforms.
- Limited documentation on error handling and permissions.
- No examples for complex use cases like batch writes.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add dependency to pubspec and run flutter pub get. No additional native configuration required.
```dart
final Content content = await ContentResolver.resolveContent(uri);
await ContentResolver.writeContent(uri.toString(), Uint8List.fromList(utf8.encode('Hello World')));
```Alternatives
Packages that do the same job and could replace content_resolver.
- king_cache
File‑ and IndexedDB‑based cache for API responses and markdown content.
71Compare - mysql_utils
A helper library that makes MySQL database operations simpler using mysql_client_plus.
67Compare - android_content_provider
Flutter plugin to use ContentProvider and ContentResolver APIs on Android.
42Compare - api_cache_manager
Stores REST API responses in SQLite for offline access
45Compare