Skip to content

Release/0.1.1 #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 30, 2024
Merged
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## [0.1.1] - 2024-12-30

- Fixed issues with imagefit and forceInsideCropArea resulting in crops outside the crop area and/or wrong crops

## [0.1.0] - 2024-12-30

- Added maskShape so you can crop using a different mask than for visualisation (e.g. circle mask for visualisation, but square mask for cropping)
- 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))
- Fixed issue with aspectratio < 1 resulting in a to big cropSizeHeight
- [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

## [0.0.13] - 2023-10-26

- Added forceInsideCropArea, whether image area must cover clip path. Default is false
Expand Down
15 changes: 0 additions & 15 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,9 @@ migration:
- platform: root
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
- platform: android
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
- platform: ios
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
- platform: linux
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
- platform: macos
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
- platform: web
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
base_revision: d9111f64021372856901a1fd5bfbc386cade3318
- platform: windows
create_revision: d9111f64021372856901a1fd5bfbc386cade3318
base_revision: d9111f64021372856901a1fd5bfbc386cade3318

# User provided section

Expand Down
15 changes: 7 additions & 8 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:math';
import 'dart:ui';

import 'package:custom_image_crop/custom_image_crop.dart';
import 'package:example/result_screen.dart';
Expand Down Expand Up @@ -101,9 +102,10 @@ class _MyHomePageState extends State<MyHomePage> {
Expanded(
child: CustomImageCrop(
cropController: controller,
// image: const AssetImage('assets/test.png'), // Any Imageprovider will work, try with a NetworkImage for example...
image: const NetworkImage(
'https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png'),
// forceInsideCropArea: true,
image: const AssetImage(
'assets/test.png'), // Any Imageprovider will work, try with a AssetImage or NetworkImage for example...
// image: const NetworkImage('https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png'),
shape: _currentShape,
ratio: _currentShape == CustomCropShape.Ratio
? Ratio(width: _width, height: _height)
Expand All @@ -114,12 +116,9 @@ class _MyHomePageState extends State<MyHomePage> {
borderRadius:
_currentShape == CustomCropShape.Ratio ? _radius : 0,
customProgressIndicator: const CupertinoActivityIndicator(),
outlineColor: Colors.red,
imageFit: _imageFit,
pathPaint: Paint()
..color = Colors.red
..strokeWidth = 4.0
..style = PaintingStyle.stroke
..strokeJoin = StrokeJoin.round,
imageFilter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
),
),
Row(
Expand Down
7 changes: 7 additions & 0 deletions example/macos/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Flutter-related
**/Flutter/ephemeral/
**/Pods/

# Xcode-related
**/dgph
**/xcuserdata/
1 change: 1 addition & 0 deletions example/macos/Flutter/Flutter-Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "ephemeral/Flutter-Generated.xcconfig"
1 change: 1 addition & 0 deletions example/macos/Flutter/Flutter-Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "ephemeral/Flutter-Generated.xcconfig"
10 changes: 10 additions & 0 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Generated file. Do not edit.
//

import FlutterMacOS
import Foundation


func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
}
Loading
Loading