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.

17 lines
467 B

2 years ago
import 'package:bot_toast/bot_toast.dart';
import 'package:permission_handler/permission_handler.dart';
class PermissionUtils {
static Future requestAllPermission() async {
Map<Permission, PermissionStatus> permission =
await [Permission.phone, Permission.sms].request();
if (await Permission.phone.isGranted) {
BotToast.showText(text: "手机申请通过");
} else {
BotToast.showText(text: "手机申请不通过");
}
}
}