戴余标 2 years ago
parent b3fc551780
commit fa00407e13

@ -15,6 +15,7 @@ import 'package:project_telephony/utils/permissionutils.dart';
import 'package:telephony/telephony.dart';
import '../../permission.dart';
import '../home/home_page.dart';
class UserPage extends StatefulWidget {
const UserPage({Key? key}) : super(key: key);
@ -32,7 +33,6 @@ class _UserPageState extends State<UserPage> {
bool vle = false;
bool tooken = true;
@override
Widget build(BuildContext context) {
return CloudScaffold(
@ -56,9 +56,7 @@ class _UserPageState extends State<UserPage> {
PloneBottom(
border: false,
onTap: () {
PermissionUtils.requestAllPermission();
// Get.to(() => const HomePage());
Get.to(() => const HomePage());
},
textColor: const Color(0xFF1890FF),
color1: const Color(0xFFEBF5FF),
@ -253,15 +251,14 @@ class _UserPageState extends State<UserPage> {
Permission.sms,
Permission.phone,
];
PermissionHelper.check(permissions,
onSuccess: () {
print('onSuccess');
}, onFailed: () {
print('onFailed');
}, onOpenSetting: () {
print('onOpenSetting');
openAppSettings();
});
PermissionHelper.check(permissions, onSuccess: () {
print('onSuccess');
}, onFailed: () {
print('onFailed');
}, onOpenSetting: () {
print('onOpenSetting');
openAppSettings();
});
setState(() {
vle = value;
});

Loading…
Cancel
Save