import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../constant/colors.dart'; import '../../constant/style.dart'; import 'elevated_btn.dart'; class MyDialog extends GetxController { void getDialog( String title, String? midTitle, Widget widget, VoidCallback onPressed) { // final textToSpeechController = Get.put(TextToSpeechController()); Get.defaultDialog( title: title, titleStyle: AppStyle.title, middleTextStyle: AppStyle.title, content: Column( children: [ // IconButton( // onPressed: () async { // // await textToSpeechController.speakText(title ?? midTitle!); // }, // icon: const Icon(Icons.headphones)), widget ], ), confirm: MyElevatedButton( title: 'Ok'.tr, onPressed: onPressed, kolor: AppColor.greenColor, ), cancel: MyElevatedButton( title: 'Cancel', kolor: AppColor.redColor, onPressed: () { Get.back(); })); } }