samre-cli 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/templates/flutter_sdk.js +30 -28
- package/src/utils/flutter.js +2 -3
package/package.json
CHANGED
|
@@ -79,38 +79,40 @@ class _SamreOverlayState extends State<SamreOverlay> {
|
|
|
79
79
|
children: [
|
|
80
80
|
widget.child,
|
|
81
81
|
|
|
82
|
-
// ── Bouton Flottant
|
|
82
|
+
// ── Bouton Flottant Rehaussé avec SafeArea (Au-dessus des barres de navigation) ──
|
|
83
83
|
Positioned(
|
|
84
|
-
bottom:
|
|
85
|
-
right:
|
|
86
|
-
child:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
color: _canSubmit ? const Color(0xFF2563EB) : Colors.black.withOpacity(0.75),
|
|
90
|
-
child: InkWell(
|
|
84
|
+
bottom: 48,
|
|
85
|
+
right: 18,
|
|
86
|
+
child: SafeArea(
|
|
87
|
+
child: Material(
|
|
88
|
+
elevation: 10,
|
|
91
89
|
borderRadius: BorderRadius.circular(24),
|
|
92
|
-
|
|
93
|
-
child:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const SizedBox(width: 8),
|
|
104
|
-
Text(
|
|
105
|
-
_canSubmit ? 'Valider Journée' : 'Test en cours (\${_secondsRemaining}s)',
|
|
106
|
-
style: const TextStyle(
|
|
90
|
+
color: _canSubmit ? const Color(0xFF2563EB) : Colors.black.withOpacity(0.85),
|
|
91
|
+
child: InkWell(
|
|
92
|
+
borderRadius: BorderRadius.circular(24),
|
|
93
|
+
onTap: _canSubmit ? _openDialog : null,
|
|
94
|
+
child: Padding(
|
|
95
|
+
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
|
96
|
+
child: Row(
|
|
97
|
+
mainAxisSize: MainAxisSize.min,
|
|
98
|
+
children: [
|
|
99
|
+
Icon(
|
|
100
|
+
_canSubmit ? Icons.verified_user : Icons.timer_outlined,
|
|
107
101
|
color: Colors.white,
|
|
108
|
-
|
|
109
|
-
fontSize: 12,
|
|
110
|
-
decoration: TextDecoration.none,
|
|
102
|
+
size: 18,
|
|
111
103
|
),
|
|
112
|
-
|
|
113
|
-
|
|
104
|
+
const SizedBox(width: 8),
|
|
105
|
+
Text(
|
|
106
|
+
_canSubmit ? 'Valider Journée' : 'Test en cours (\${_secondsRemaining}s)',
|
|
107
|
+
style: const TextStyle(
|
|
108
|
+
color: Colors.white,
|
|
109
|
+
fontWeight: FontWeight.bold,
|
|
110
|
+
fontSize: 12,
|
|
111
|
+
decoration: TextDecoration.none,
|
|
112
|
+
),
|
|
113
|
+
),
|
|
114
|
+
],
|
|
115
|
+
),
|
|
114
116
|
),
|
|
115
117
|
),
|
|
116
118
|
),
|
package/src/utils/flutter.js
CHANGED
|
@@ -76,10 +76,9 @@ export const FlutterUtil = {
|
|
|
76
76
|
|
|
77
77
|
let modified = content;
|
|
78
78
|
|
|
79
|
-
// 1. Ajouter l'import en haut
|
|
80
|
-
const importStatement = "import 'package:flutter/material.dart';\nimport 'samre_sdk.dart';\n";
|
|
79
|
+
// 1. Ajouter l'import de samre_sdk en haut (sans dupliquer material.dart)
|
|
81
80
|
if (!modified.includes('samre_sdk.dart')) {
|
|
82
|
-
modified =
|
|
81
|
+
modified = "import 'samre_sdk.dart';\n" + modified;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
// 2. Tenter d'injecter dans builder de MaterialApp (Idéal pour tous les écrans et le routage)
|