requestSmsPermission method
Future<void>
requestSmsPermission(
)
Implementation
Future<void> requestSmsPermission() async {
await Permission.sms.request();
var status = await Permission.sms.status;
if (status.isDenied) {
// We didn't ask for permission yet or the permission has been denied before but not permanently.
}
// You can can also directly ask the permission about its status.
if (await Permission.location.isRestricted) {
// The OS restricts access, for example because of parental controls.
}
}