flutter_image_utils 0.2.0

flutter_image_utils #

pub package

Crops image as native plugin, both iOS and Android

Usage #

Full example

# pubspec.yaml

dependencies:
  flutter_image_utils: ^0.2.0
// E.g. lib/main.dart

import 'dart:typed_data';
import 'package:flutter_image_utils/flutter_image_utils.dart';

/* ... */

final img = AssetImage('assets/some_image.jpg');
final config = new ImageConfiguration();

final key = await img.obtainKey(config);
final data = await key.bundle.load(key.name);

final imgBytes = data.buffer.asUint8List();

// All other methods can be used same way
final cropped = await FlutterImageUtils.cropImage(
  imgBytes,
  x: 0,
  y: 0,
  width: 50,
  height: 50,
  quality: 85,
);

/* ... */

MemoryImage(Uint8List.fromList(cropped))

0.2.0 #

  • AndroidX support
  • Flutter 1.7 support

0.1.0+3 #

  • removed all flutter_image_crop and FlutterImageCrop occurences

0.1.0+2 #

  • Fixed description
  • Upgraded image_picker dev dependency
  • Formatted flutter_image_utils.dart

0.1.0+1 #

  • Fixed version in README

0.1.0 #

  • Initial release. Implemented resize, resizeToMax, crop and rotate methods

example/README.md

flutter_image_utils_example #

Demonstrates how to use the flutter_image_utils plugin.

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_image_utils: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:flutter_image_utils/flutter_image_utils.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
69
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]
85
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
image_picker ^0.6.1+3