Dart Thumbor client #
Dart client for the Thumbor image service
thumbor dependency to your
dependencies: thumbor: any
In your Dart code, import
package:thumbor/thumbor.dart and create a
Thumbor using the hostname of your server and optionally your key:
import 'package:thumbor/thumbor.dart'; final thumbor = Thumbor(hostname: "http://thumbor.example.com", key: "123456789");
Then you can use this instance to create
final thumbor = Thumbor(hostname: "http://thumbor.example.com", key: "123456789"); thumbor .buildImage("http://images.google.com/im-feeling-lucky.jpg") .toUrl();
[0.0.3] - 12-07-2018
- Adds resize
- Adds manual crop
- Adds trim with trimming orientation and tolerance
[0.0.2] - 12-07-2018
- Fixes issue where images wouldn't load because the encoded HMAC wasnt URL safe
[0.0.1] - 28-06-2018
- Initial release
- Create simple URIs without any configurations
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: thumbor: ^1.0.0
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jan 17, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
Health issues and suggestions
Document public APIs. (-1 points)
74 out of 74 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
lib/src/thumbor_url.dart. (-10.44 points)
lib/src/thumbor_url.dart reported 22 hints, including:
line 10 col 42: Avoid const keyword.
line 12 col 7: Avoid const keyword.
line 20 col 43: Avoid const keyword.
line 21 col 45: Avoid const keyword.
line 22 col 44: Avoid const keyword.
lib/src/thumbor.dart. (-0.50 points)
lib/src/thumbor.dart reported 1 hint:
line 17 col 12: Unnecessary new keyword.
Package is getting outdated. (-48.77 points)
The package was last published 77 weeks ago.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
thumbor.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.