fix: cadre de centrage au ratio de la photo + bouton calibration Valider
This commit is contained in:
@@ -268,7 +268,7 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
|||||||
_openImpactEditor(context.read<AnalysisProvider>());
|
_openImpactEditor(context.read<AnalysisProvider>());
|
||||||
},
|
},
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'TERMINER',
|
'VALIDER',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
|||||||
@@ -101,10 +101,18 @@ class _CropScreenState extends State<CropScreen> {
|
|||||||
? const Center(child: CircularProgressIndicator(color: Color(0xFF1A73E8)))
|
? const Center(child: CircularProgressIndicator(color: Color(0xFF1A73E8)))
|
||||||
: Column(
|
: Column(
|
||||||
children: [
|
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(
|
Expanded(
|
||||||
|
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(
|
child: Container(
|
||||||
margin: const EdgeInsets.all(20),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(color: Colors.white10),
|
border: Border.all(color: Colors.white10),
|
||||||
@@ -115,6 +123,9 @@ class _CropScreenState extends State<CropScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
// TEXTE D'AIDE AJUSTÉ
|
// TEXTE D'AIDE AJUSTÉ
|
||||||
Padding(
|
Padding(
|
||||||
|
|||||||
Reference in New Issue
Block a user