You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
1 year ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:get/get_core/src/get_main.dart';
|
||
|
import 'package:get/get_navigation/get_navigation.dart';
|
||
|
import 'package:permission_handler/permission_handler.dart';
|
||
|
|
||
|
import 'app_colors.dart';
|
||
|
import 'primary_button.dart';
|
||
|
import 'primary_text.dart';
|
||
|
|
||
|
void showPermissionAlertDialog({
|
||
|
String title = "Need Permission",
|
||
|
required String requestMsg,
|
||
|
bool barrierDismissible = true,
|
||
|
}) {
|
||
|
Get.defaultDialog(
|
||
|
title: title,
|
||
|
middleText: "",
|
||
|
backgroundColor: Colors.white,
|
||
|
contentPadding: const EdgeInsets.only(top: 30, bottom: 30.0),
|
||
|
radius: 10,
|
||
|
barrierDismissible: barrierDismissible,
|
||
|
titlePadding: const EdgeInsets.only(top: 15),
|
||
|
titleStyle: const TextStyle(
|
||
|
color: AppColors.grey900Color,
|
||
|
fontSize: 18,
|
||
|
fontWeight: FontWeight.w600,
|
||
|
),
|
||
|
/*cancel: PrimaryButton(
|
||
|
title: "DISMISS",
|
||
|
onPressed: () {},
|
||
|
textSize: AppSizes.font_13,
|
||
|
bgColor: AppColors.grey500Color,
|
||
|
),*/
|
||
|
confirm: PrimaryButton(
|
||
|
title: "GO TO SETTINGS",
|
||
|
onPressed: () {
|
||
|
openAppSettings();
|
||
|
Get.back();
|
||
|
},
|
||
|
textSize: 13,
|
||
|
),
|
||
|
content: Padding(
|
||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||
|
child: PrimaryText(
|
||
|
requestMsg,
|
||
|
textAlign: TextAlign.center,
|
||
|
fontColor: AppColors.grey800Color,
|
||
|
fontSize: 15,
|
||
|
fontWeight: FontWeight.w500,
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|