How can I send for example SMS code verification in Flutter (without Firebase Auth because I have MySQL database with PHP connection).
I have tried :
Future<void> _sendCode(String phoneNumber) async
{
phoneNumber = "XX XX XX XX XX";
String code = _createCode();
String message = "The code is $code";
String uri = 'sms:$phoneNumber?body=$message';
await launchUrlString(uri);
}
And many other things, but it open messaging on my device. I want the code to be sent automatically.
I have tried to find out how to send a message from PHP but without satisfactory result.
CodePudding user response:
You can try flutter_otp package I think it's the best option,
You can visit https://pub.dev/packages/flutter_otp for more info,
CodePudding user response:
You can also use url_launcher package.