thumbor 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 57

Dart Thumbor client #

Dart client for the Thumbor image service

Usage #

Add thumbor dependency to your pubspec.yaml:

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 ThumborUrl


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:

with pub:


$ pub get

with Flutter:


$ 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:


import 'package:thumbor/thumbor.dart';
  
Version Uploaded Documentation Archive
1.0.0 Jul 22, 2018 Go to the documentation of thumbor 1.0.0 Download thumbor 1.0.0 archive
0.0.4 Jul 22, 2018 Go to the documentation of thumbor 0.0.4 Download thumbor 0.0.4 archive
0.0.3 Jul 12, 2018 Go to the documentation of thumbor 0.0.3 Download thumbor 0.0.3 archive
0.0.2 Jul 12, 2018 Go to the documentation of thumbor 0.0.2 Download thumbor 0.0.2 archive
0.0.1 Jun 28, 2018 Go to the documentation of thumbor 0.0.1 Download thumbor 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
20
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
57
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:thumbor/thumbor.dart.

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.

Fix lib/src/thumbor_url.dart. (-1.99 points)

Analysis of lib/src/thumbor_url.dart reported 4 hints:

line 208 col 9: Use isEmpty instead of length

line 216 col 29: Use isEmpty instead of length

line 383 col 29: Use isEmpty instead of length

line 408 col 29: Use isEmpty instead of length

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and thumbor.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.1.2 <3.0.0
crypto ^2.0.0 2.0.6
Transitive dependencies
charcode 1.1.2
collection 1.14.11
convert 2.1.1
typed_data 1.1.6
Dev dependencies
test ^1.3.0