crop_your_image
crop_your_image copied to clipboard
`maskColor` is displayed beyond the imageRect inside of a `Stack`
When rendering the Crop
widget inside of a Stack
widget, the maskColor
fills the parent Stack
widget instead of displaying the underlying color of the parent widget.
Code sample:
class _Body extends StatelessWidget {
const _Body({Key? key, required this.bytes}) : super(key: key);
final UInt8List bytes;
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (_, constraints) {
return Scaffold(
backgroundColor: Colors.white,
body: Stack(
children: [
Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(24),
child: Crop(
controller: CropController(),
image: bytes,
onCropped: (croppedData) {},
aspectRatio: 1,
initialSize: 1.0,
cornerDotBuilder: (size, _) => const DotControl(),
baseColor: AppColors.scaffoldBackgroundColor,
),
),
),
],
),
);
},
);
}
}