Ai window menu fix
This commit is contained in:
@@ -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();
|
||||||
@@ -241,59 +209,16 @@ class _AiChatState extends State<AiChat> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Stack(
|
Text(
|
||||||
children: [
|
snapshot.requireData,
|
||||||
Text(
|
textAlign: TextAlign.left,
|
||||||
snapshot.requireData,
|
style: TextStyle(
|
||||||
textAlign: TextAlign.left,
|
color: MzanziInnovationHub.of(context)!
|
||||||
style: TextStyle(
|
.theme
|
||||||
color: MzanziInnovationHub.of(context)!
|
.secondaryColor(),
|
||||||
.theme
|
fontSize: _chatFrontSize,
|
||||||
.secondaryColor(),
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: _chatFrontSize,
|
),
|
||||||
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(),
|
|
||||||
// ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user