Skip to content
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

Numanshakir patch 2 #180

Open
wants to merge 2 commits into
base: release/2.0.0
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion lib/src/widget/crop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ class Crop extends StatelessWidget {
/// which is called after loading [image] data for the first time.
final ValueChanged<CropStatus>? onStatusChanged;

/// [Color] of the interactive area widget which is placed over the cropping editor.
final Color? interactiveAreaColor;

/// [Color] of the mask widget which is placed over the cropping editor.
final Color? maskColor;

Expand Down Expand Up @@ -163,6 +166,7 @@ class Crop extends StatelessWidget {
this.onImageMoved,
this.onStatusChanged,
this.maskColor,
this.interactiveAreaColor,
this.baseColor = Colors.white,
this.radius = 0,
this.cornerDotBuilder,
Expand Down Expand Up @@ -202,6 +206,7 @@ class Crop extends StatelessWidget {
onImageMoved: onImageMoved,
onStatusChanged: onStatusChanged,
maskColor: maskColor,
interactiveAreaColor: interactiveAreaColor,
baseColor: baseColor,
radius: radius,
cornerDotBuilder: cornerDotBuilder,
Expand Down Expand Up @@ -235,6 +240,7 @@ class _CropEditor extends StatefulWidget {
final void Function(Rect imageRect)? onImageMoved;
final ValueChanged<CropStatus>? onStatusChanged;
final Color? maskColor;
final Color? interactiveAreaColor;
final Color baseColor;
final double radius;
final CornerDotBuilder? cornerDotBuilder;
Expand Down Expand Up @@ -264,6 +270,7 @@ class _CropEditor extends StatefulWidget {
required this.onStatusChanged,
required this.maskColor,
required this.baseColor,
required this.interactiveAreaColor,
required this.radius,
required this.cornerDotBuilder,
required this.clipBehavior,
Expand Down Expand Up @@ -678,7 +685,7 @@ class _CropEditorState extends State<_CropEditor> {
child: Container(
width: _readyState.cropRect.width,
height: _readyState.cropRect.height,
color: Colors.transparent,
color: widget.interactiveAreaColor ?? Colors.transparent,
),
),
),
Expand Down