Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
## 0.2.5

* Ratio options can be provided in ImageEditor as well as in ImageCropper

## 0.2.4

* Ratio options can be provided in constructor
* Allowed feature list can be provided in constructor
* Image compress height & width parameter added

## 0.2.3

* Bug fixes

## 0.2.2

* Dependencies updated
* Bug fixes

## 0.2.1

* Dependencies updated
* Bug fixes

## 0.2.0

* Dependencies updated

## 0.1.8

* Performance optimization
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 hsbijarniya@gmail.com
Copyright (c) 2022 hsbijarniya@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,29 @@ import 'package:image_editor_plus/utils.dart';

// to jpeg
final convertedImage = await ImageUtils.convert(
image: data, // <-- Uint8List/path of image
image: data, // <-- Uint8List of image
format: 'jpg',
quality: 80,
);

// to heic
// to png
final convertedImage = await ImageUtils.convert(
image: data, // <-- Uint8List/path of image
format: 'heic',
image: data, // <-- Uint8List of image
format: 'png',
quality: 80,
);

// to png
// to webp else jpg (note: webp required one alernate target format in case it's not available)
final convertedImage = await ImageUtils.convert(
image: data, // <-- Uint8List/path of image
format: 'png',
image: data, // <-- Uint8List of image
format: 'webp|jpg',
quality: 80,
);

// to webp
// to webp else png (note: webp required one alernate target format in case it's not available)
final convertedImage = await ImageUtils.convert(
image: data, // <-- Uint8List/path of image
format: 'webp',
image: data, // <-- Uint8List of image
format: 'webp|png',
quality: 80,
);
```
Expand Down
21 changes: 5 additions & 16 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_editor_plus/image_editor_plus.dart';
import 'package:image_editor_plus/utils.dart';

void main() {
runApp(
Expand All @@ -13,11 +12,11 @@ void main() {

class ImageEditorExample extends StatefulWidget {
const ImageEditorExample({
super.key,
});
Key? key,
}) : super(key: key);

@override
createState() => _ImageEditorExampleState();
_ImageEditorExampleState createState() => _ImageEditorExampleState();
}

class _ImageEditorExampleState extends State<ImageEditorExample> {
Expand Down Expand Up @@ -77,18 +76,8 @@ class _ImageEditorExampleState extends State<ImageEditorExample> {
imageData,
],
allowMultiple: true,
features: const ImageEditorFeatures(
pickFromGallery: true,
captureFromCamera: true,
crop: true,
blur: true,
brush: true,
emoji: true,
filters: true,
flip: true,
rotate: true,
text: true,
),
allowCamera: true,
allowGallery: true,
),
),
);
Expand Down
4 changes: 0 additions & 4 deletions lib/data/editor_mode.dart

This file was deleted.

5 changes: 4 additions & 1 deletion lib/data/layer.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:image_editor_plus/data/image_item.dart';
import 'package:nb_utils/nb_utils.dart';

/// Layer class with some common properties
class Layer {
Expand Down Expand Up @@ -34,6 +35,7 @@ class EmojiLayerData extends Layer {
double size;

EmojiLayerData({
Key? key,
this.text = '',
this.size = 64,
Offset? offset,
Expand All @@ -54,6 +56,7 @@ class ImageLayerData extends Layer {
double size;

ImageLayerData({
Key? key,
required this.image,
this.size = 64,
Offset? offset,
Expand All @@ -79,7 +82,7 @@ class TextLayerData extends Layer {
TextLayerData({
required this.text,
this.size = 64,
this.color = Colors.white,
this.color = white,
this.background = Colors.transparent,
this.backgroundOpacity = 1,
this.align = TextAlign.left,
Expand Down
Loading