imgix 0.2.0

Imgix Dart #

An Imgix library for Dart. Generate Imgix URLs with options easily

For use in Flutter, check out imgix_flutter

Install #

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

dependencies:
  imgix: ^0.2.0

Usage #

API Docs

import 'package:imgix/imgix.dart';

main() {
  final url = getImgixUrl(
    "https://test.imgix.net/test.png",
    ImgixOptions(
      width: 100,
      height: 200,
      format: ImgixFormat.jpg,
      quality: 75,
      auto: [ImgixAuto.compress],
    ),
  );

  print(url);
  // https://test.imgix.net/test.png?fm=jpg&h=200&w=100&auto=compress&q=75
}

Features and bugs #

Some options are missing. They will be added on request, or open a pull request!

Please file feature requests and bugs at the issue tracker.

[0.2.0] - 2018-12-13

  • Decouple code into multiple files and improve docs
  • Add border, borderRadius, and borderRadiusInner
  • Add padding, and backgroundColor
  • Add fillColor, and fillMode
  • Add downloadFileName
  • Add rotation, and flip
  • Add brightness

[0.1.2] - 2018-12-11

  • Add imgix_flutter link and fix issue tracker link

[0.1.1] - 2018-12-11

  • Fixed package meta info (add description, add install instructions, add docs link)

[0.1.0] - 2018-12-11

  • Initial release

example/imgix_example.dart

import 'package:imgix/imgix.dart';

main() {
  final url = getImgixUrl(
    "https://test.imgix.net/test.png",
    ImgixOptions(
      width: 100,
      height: 200,
      format: ImgixFormat.jpg,
      quality: 75,
      auto: [ImgixAuto.compress],
    ),
  );

  print(url);
  // https://test.imgix.net/test.png?fm=jpg&h=200&w=100&auto=compress&q=75
}

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
meta ^1.0.0 1.1.7
Dev dependencies
test ^1.0.0