uploadcare 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 65

A dart library for Uploadcare.

Build Status Build codecov

Usage #

A simple usage example:

import 'package:uploadcare/uploadcare.dart';

main() {
  var cdnPathBuilder = CdnPathBuilder('693037a8-1c7c-4a4d-9d09-361c67c8cb3a');
  print('path: ${cdnPathBuilder.crop(10, 10).build()}');}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.2.0 #

  • cdn client

0.1.2 #

  • intelligence: file information, color recognition

0.1.1 #

  • feat: progressive operation
  • feat: image format - webp, auto

0.1.0 #

  • CdnPathBuilder

0.0.1 #

  • Initial version

example/uploadcare_example.dart

import 'package:uploadcare/src/cdn_client.dart';
import 'package:uploadcare/uploadcare.dart';

void main() async {
  var cdnPathBuilder = CdnPathBuilder('693037a8-1c7c-4a4d-9d09-361c67c8cb3a');
  print('path: ${cdnPathBuilder.crop(10, 10).build()}');
}

Use this package as a library

1. Depend on it

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


dependencies:
  uploadcare: ^0.2.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:uploadcare/uploadcare.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
96
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

We analyzed this package on Jul 15, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15

Analysis suggestions

Package not compatible with runtime flutter-web on Web

Because:

  • package:uploadcare/uploadcare.dart that imports:
  • package:uploadcare/src/cdn_client.dart that imports:
  • package:restio/restio.dart that imports:
  • package:restio/src/retrofit/result.dart that imports:
  • package:restio/src/core/request/header/headers.dart that imports:
  • package:restio/src/core/request/header/headers_builder.dart that imports:
  • package:restio/src/core/request/header/header.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:uploadcare/uploadcare.dart that imports:
  • package:uploadcare/src/cdn_client.dart that imports:
  • package:restio/restio.dart that imports:
  • package:restio/src/retrofit/result.dart that imports:
  • package:restio/src/core/request/header/headers.dart that imports:
  • package:restio/src/core/request/header/headers_builder.dart that imports:
  • package:restio/src/core/request/header/header.dart that imports:
  • dart:io

Health suggestions

Fix lib/src/model/rgb.dart. (-1.49 points)

Analysis of lib/src/model/rgb.dart reported 3 hints:

line 13 col 16: Unnecessary cast.

line 13 col 32: Unnecessary cast.

line 13 col 48: Unnecessary cast.

Fix lib/src/client.dart. (-1 points)

Analysis of lib/src/client.dart reported 2 hints:

line 29 col 8: This function has a return type of 'File', but doesn't end with a return statement.

line 30 col 9: The value of the local variable 'url' isn't used.

Fix lib/src/uploader.dart. (-1 points)

Analysis of lib/src/uploader.dart reported 2 hints:

line 16 col 10: The value of the field '_store' isn't used.

line 42 col 8: This function has a return type of 'File', but doesn't end with a return statement.

Fix lib/src/cdn_path_builder.dart. (-0.50 points)

Analysis of lib/src/cdn_path_builder.dart reported 1 hint:

line 1 col 8: Unused import: 'file.dart'.

Fix lib/src/request_helper.dart. (-0.50 points)

Analysis of lib/src/request_helper.dart reported 1 hint:

line 60 col 13: The value of the local variable 'signature' isn't used.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (freezed_annotation).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
crypto ^2.1.4 2.1.5
freezed_annotation ^0.7.1 0.7.1 0.11.0
http ^0.12.1 0.12.1
intl ^0.16.1 0.16.1
restio ^0.10.5 0.10.7
Transitive dependencies
brotli 0.3.0+1
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
convert 2.1.1
equatable 1.2.2
fixnum 0.10.11
globbing 0.3.1
http2 1.0.0
http_parser 3.1.4
ip 0.1.1
json_annotation 3.0.1
matcher 0.12.9
meta 1.2.2 1.3.0-nullsafety
mime_type 0.3.2
path 1.7.0
raw 0.2.0
source_span 1.7.0
stack_trace 1.9.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety
utf 0.9.0+5
Dev dependencies
build_runner ^1.10.0
freezed ^0.10.8
json_serializable ^3.3.0
mockito ^4.1.1
pedantic ^1.9.0 1.9.2
remove_from_coverage ^1.0.7
test ^1.14.3
test_coverage ^0.4.1