Ai window menu fix

This commit is contained in:
2025-05-28 12:41:09 +02:00
parent abd6ebb331
commit 193fc79a3d

View File

@@ -172,64 +172,32 @@ class _AiChatState extends State<AiChat> {
return MihPackageWindow( return MihPackageWindow(
fullscreen: false, fullscreen: false,
windowTitle: 'Mzansi AI Thoughts', windowTitle: 'Mzansi AI Thoughts',
// menuOptions: Row( menuOptions: _aiThinking == true
// children: [ ? null
// Visibility( : [
// visible: _aiThinking == false, SpeedDialChild(
// child: Padding( child: Icon(
// padding: const EdgeInsets.all(5.0), Icons.volume_up,
// child: Container( color: MzanziInnovationHub.of(context)!
// //color: MzanziInnovationHub.of(context)!.theme.successColor(), .theme
// decoration: BoxDecoration( .primaryColor(),
// color: MzanziInnovationHub.of(context)! ),
// .theme label: "Read Aloud",
// .successColor(), labelBackgroundColor:
// borderRadius: const BorderRadius.all( MzanziInnovationHub.of(context)!.theme.successColor(),
// Radius.circular(100), labelStyle: TextStyle(
// ), color: MzanziInnovationHub.of(context)!
// ), .theme
// child: IconButton( .primaryColor(),
// color: MzanziInnovationHub.of(context)! fontWeight: FontWeight.bold,
// .theme ),
// .primaryColor(), backgroundColor:
// onPressed: () async { MzanziInnovationHub.of(context)!.theme.successColor(),
// print("Start TTS now"); onTap: () {
_speakText(snapshot.requireData);
// _speakText(snapshot.requireData); },
// }, )
// icon: const Icon(Icons.volume_up), ],
// ),
// ),
// ),
// ),
// Visibility(
// visible: _aiThinking == true,
// child: Padding(
// padding: const EdgeInsets.all(5.0),
// child: Container(
// // color: MzanziInnovationHub.of(context)!.theme.errorColor(),
// decoration: BoxDecoration(
// color:
// MzanziInnovationHub.of(context)!.theme.errorColor(),
// borderRadius: const BorderRadius.all(
// Radius.circular(100),
// ),
// ),
// child: IconButton(
// color: MzanziInnovationHub.of(context)!
// .theme
// .primaryColor(),
// onPressed: () {
// //print("Start TTS now");
// _flutterTts.stop();
// },
// icon: const Icon(Icons.volume_off),
// ),
// ),
// ),
// ),
// ],
// ),
onWindowTapClose: () { onWindowTapClose: () {
_captureAIResponse(snapshot.requireData); _captureAIResponse(snapshot.requireData);
_flutterTts.stop(); _flutterTts.stop();
@@ -240,8 +208,6 @@ class _AiChatState extends State<AiChat> {
// color: Colors.black, // color: Colors.black,
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [
Stack(
children: [ children: [
Text( Text(
snapshot.requireData, snapshot.requireData,
@@ -254,47 +220,6 @@ class _AiChatState extends State<AiChat> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
Positioned(
bottom: 0,
right: 0,
child: Visibility(
visible: _aiThinking == false,
child: IconButton.filled(
iconSize: 25,
autofocus: true,
onPressed: () {
_captureAIResponse(snapshot.requireData);
_flutterTts.stop();
Navigator.of(context).pop();
},
focusColor: MzanziInnovationHub.of(context)!
.theme
.successColor(),
icon: Icon(
Icons.check,
color: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
),
),
// MIHButton(
// onTap: () {
// _captureAIResponse(snapshot.requireData);
// Navigator.of(context).pop();
// },
// buttonText: "Continue",
// buttonColor: MzanziInnovationHub.of(context)!
// .theme
// .successColor(),
// textColor: MzanziInnovationHub.of(context)!
// .theme
// .primaryColor(),
// ),
),
),
],
),
], ],
), ),
), ),