Skip to content

Commit 1487fa0

Browse files
Merge pull request #61 from icapps/release/0.1.1
Release/0.1.1
2 parents bc8905d + 45d01a9 commit 1487fa0

37 files changed

+1417
-83
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## [0.1.1] - 2024-12-30
2+
3+
- Fixed issues with imagefit and forceInsideCropArea resulting in crops outside the crop area and/or wrong crops
4+
5+
## [0.1.0] - 2024-12-30
6+
7+
- Added maskShape so you can crop using a different mask than for visualisation (e.g. circle mask for visualisation, but square mask for cropping)
8+
- Added imageFilter and imageFilterBlendMode so you can add filters like blur the image outside the crop area (for example ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0))
9+
- Fixed issue with aspectratio < 1 resulting in a to big cropSizeHeight
10+
- [Possibly breaking] Added outlineStrokeWidth and outlineColor to CustomImageCrop to customize the outline of the crop shape, if you provided custom drawPath method, you will need to add these to the method, but you do not need to use them if you don't want to customize the outline from the CustomImageCrop widget
11+
112
## [0.0.13] - 2023-10-26
213

314
- Added forceInsideCropArea, whether image area must cover clip path. Default is false

example/.metadata

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,9 @@ migration:
1515
- platform: root
1616
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
1717
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
18-
- platform: android
19-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
20-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
21-
- platform: ios
22-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
23-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
24-
- platform: linux
25-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
26-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
2718
- platform: macos
2819
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
2920
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
30-
- platform: web
31-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
32-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
33-
- platform: windows
34-
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
35-
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
3621

3722
# User provided section
3823

example/lib/main.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'dart:math';
2+
import 'dart:ui';
23

34
import 'package:custom_image_crop/custom_image_crop.dart';
45
import 'package:example/result_screen.dart';
@@ -101,9 +102,10 @@ class _MyHomePageState extends State<MyHomePage> {
101102
Expanded(
102103
child: CustomImageCrop(
103104
cropController: controller,
104-
// image: const AssetImage('assets/test.png'), // Any Imageprovider will work, try with a NetworkImage for example...
105-
image: const NetworkImage(
106-
'https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png'),
105+
// forceInsideCropArea: true,
106+
image: const AssetImage(
107+
'assets/test.png'), // Any Imageprovider will work, try with a AssetImage or NetworkImage for example...
108+
// image: const NetworkImage('https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png'),
107109
shape: _currentShape,
108110
ratio: _currentShape == CustomCropShape.Ratio
109111
? Ratio(width: _width, height: _height)
@@ -114,12 +116,9 @@ class _MyHomePageState extends State<MyHomePage> {
114116
borderRadius:
115117
_currentShape == CustomCropShape.Ratio ? _radius : 0,
116118
customProgressIndicator: const CupertinoActivityIndicator(),
119+
outlineColor: Colors.red,
117120
imageFit: _imageFit,
118-
pathPaint: Paint()
119-
..color = Colors.red
120-
..strokeWidth = 4.0
121-
..style = PaintingStyle.stroke
122-
..strokeJoin = StrokeJoin.round,
121+
imageFilter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
123122
),
124123
),
125124
Row(

example/macos/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/dgph
7+
**/xcuserdata/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
import FlutterMacOS
6+
import Foundation
7+
8+
9+
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
10+
}

0 commit comments

Comments
 (0)