unsplash_client
4.0.0, released 4 weeks ago by gabriel.terwesten.net
An Unsplash REST API client for Dart and Flutter.
WASM-ready
What it does
Provides a client to interact with the Unsplash REST API. Allows fetching metadata about photos, random photos, and handling custom photo variant URLs.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to fetch high-resolution photos and metadata from Unsplash in your application.
Skip it when
- You need endpoints that act on behalf of a user, which are not implemented yet.
Strengths
- Easy setup with Unsplash app credentials.
- Built-in utilities for resizing and customizing photo URLs.
Weaknesses
- Endpoints acting on behalf of a user are not yet implemented.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Requires registering as a developer on the Unsplash developer portal and obtaining credentials (access and secret keys).
final client = UnsplashClient(
settings: ClientSettings(credentials: AppCredentials(
accessKey: '...',
secretKey: '...',
)),
);
final photos = await client.photos.random(count: 1).goAndGet();
final photo = photos.first;
client.close();Alternatives
Packages that do the same job and could replace unsplash_client.
Works with
Packages commonly used together with unsplash_client: ones it builds on, ones built on it, and its own family.