fix: cadre de centrage au ratio de la photo + bouton calibration Valider
This commit is contained in:
@@ -101,17 +101,28 @@ class _CropScreenState extends State<CropScreen> {
|
||||
? const Center(child: CircularProgressIndicator(color: Color(0xFF1A73E8)))
|
||||
: Column(
|
||||
children: [
|
||||
// Zone interactive de crop
|
||||
// Zone interactive de crop. Le cadre épouse le ratio réel de la photo
|
||||
// (AspectRatio) → la photo le remplit bord à bord, sans bande noire de
|
||||
// letterbox. La fenêtre de visée carrée reste centrée à l'intérieur.
|
||||
Expanded(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: Colors.white10),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: _imageLoaded ? _buildInteractiveCrop() : const Center(child: CircularProgressIndicator()),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Center(
|
||||
child: AspectRatio(
|
||||
aspectRatio: (_imageSize != null && _imageSize!.height > 0)
|
||||
? _imageSize!.width / _imageSize!.height
|
||||
: 1.0,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: Colors.white10),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: _imageLoaded ? _buildInteractiveCrop() : const Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user