|
|
|
|
@ -54,9 +54,11 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/foundation.dart' show TargetPlatform;
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_tts/flutter_tts.dart';
|
|
|
|
|
import 'package:permission_handler/permission_handler.dart';
|
|
|
|
|
@ -896,17 +898,6 @@ class RoboSearch {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
showAlertDialog(BuildContext context) {
|
|
|
|
|
//AlertDialog alert = AlertDialog
|
|
|
|
|
// AlertDialog alert = AlertDialog(content: MyStatefulBuilder(dispose: () {
|
|
|
|
|
// print('dispose!!!!!!!!!!!!');
|
|
|
|
|
// })
|
|
|
|
|
// isClosed = true;
|
|
|
|
|
// streamSubscription.cancel();
|
|
|
|
|
// }, builder: (BuildContext context, StateSetter setState) {
|
|
|
|
|
// //print(streamSubscription);
|
|
|
|
|
// }),
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
// show the dialog
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
@ -918,7 +909,6 @@ class RoboSearch {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
print(dialog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static closeAlertDialog(BuildContext context) {
|
|
|
|
|
@ -946,6 +936,7 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
|
|
|
|
|
var searchText;
|
|
|
|
|
static StreamSubscription<dynamic> streamSubscription;
|
|
|
|
|
static var isClosed = false;
|
|
|
|
|
stt.SpeechToText speech = stt.SpeechToText();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
@ -1006,6 +997,21 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
|
|
|
|
|
event.setValue({'startPopUp': 'true'});
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
searchText != 'null' && searchText != null && Theme.of(context).platform == TargetPlatform.iOS
|
|
|
|
|
? Center(
|
|
|
|
|
child: DefaultButton(
|
|
|
|
|
TranslationBase.of(context).ok,
|
|
|
|
|
() {
|
|
|
|
|
RoboSearch.closeAlertDialog(context);
|
|
|
|
|
speech.stop();
|
|
|
|
|
// event.setValue({"searchText": {
|
|
|
|
|
// 'isIOSFeedback':true,
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
: SizedBox()
|
|
|
|
|
]),
|
|
|
|
|
)));
|
|
|
|
|
|