dialog added to app settings

merge-requests/132/head
haroon amjad 2 years ago
parent c763e16f41
commit f933539395

@ -1200,7 +1200,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
playerController.dispose();
}
void startRecoding() async {
void startRecoding(BuildContext context) async {
// if (await Permission.microphone.request().isGranted) {
// sRecoding();
// } else {
@ -1209,13 +1209,25 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
// }
await Permission.microphone.request().then((PermissionStatus status) {
if (status.isPermanentlyDenied) {
openAppSettings();
Utils.confirmDialog(
context,
"The app needs microphone access to be able to record audio.",
onTap: () {
openAppSettings();
},
);
} else if (status.isDenied) {
openAppSettings();
Utils.confirmDialog(
context,
"The app needs microphone access to be able to record audio.",
onTap: () {
openAppSettings();
},
);
} else if (status.isGranted) {
sRecoding();
} else {
startRecoding();
startRecoding(context);
}
});
}

@ -301,7 +301,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
Icons.mic,
color: MyColors.lightGreenColor,
).paddingOnly(right: 15).onPress(() {
m.startRecoding();
m.startRecoding(context);
}),
SvgPicture.asset("assets/icons/chat/chat_send_icon.svg", height: 26, width: 26)
.onPress(

@ -101,7 +101,7 @@ class _MyTeamScreenState extends State<MyTeamScreen> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(m.teamMembersList![index].userName! ?? "").toText14(color: MyColors.darkTextColor).paddingOnly(left: 11, top: 13),
(m.teamMembersList[index].userName! ?? "").toText14(color: MyColors.darkTextColor).paddingOnly(left: 11, top: 13),
],
).expanded,
// SizedBox(

Loading…
Cancel
Save