Compare commits
1 Commits
feature/no
...
feature/ch
Author | SHA1 | Date | |
---|---|---|---|
5354575430 |
@@ -853,12 +853,55 @@ class _MyHomePageState extends State<ListItemMenu> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||||
onPressed: popCamera,
|
const SizedBox(height: 12), // espace entre les deux boutons
|
||||||
backgroundColor: Colors.blue,
|
FloatingActionButton(
|
||||||
tooltip: loc?.search ?? 'Recherche',
|
heroTag: "btn2",
|
||||||
child: const Icon(Icons.photo_camera, color: Colors.white),
|
onPressed: () {
|
||||||
),
|
// Action du deuxième bouton : ouvrir ton modal
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
final controller = TextEditingController();
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text("Nouveau message"),
|
||||||
|
content: TextField(
|
||||||
|
controller: controller,
|
||||||
|
decoration:
|
||||||
|
InputDecoration(hintText: "Écris ton message..."),
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
child: Text("Annuler"),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
final msg = controller.text.trim();
|
||||||
|
if (msg.isNotEmpty) {
|
||||||
|
print("Message saisi: $msg");
|
||||||
|
// ➝ ici tu peux envoyer à ton chatbot
|
||||||
|
}
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Text("Envoyer"),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
tooltip: 'Chatbot',
|
||||||
|
child: const Icon(Icons.chat, color: Colors.white),
|
||||||
|
),
|
||||||
|
FloatingActionButton(
|
||||||
|
onPressed: popCamera,
|
||||||
|
backgroundColor: Colors.blue,
|
||||||
|
tooltip: loc?.search ?? 'Recherche',
|
||||||
|
child: const Icon(Icons.photo_camera, color: Colors.white),
|
||||||
|
)
|
||||||
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user