smssak 1.0.2
smssak: ^1.0.2 copied to clipboard
A Dart package for sending and verifying OTPs (One-Time Passwords) via SMS. Easily integrate OTP functionality into your Flutter apps.
example/smssak_example.dart
import 'package:smssak/smssak.dart';
void main() async {
final otpService = OTPService();
// Send OTP
final sendOTPResponse = await otpService.sendOtp(
country: 'dz', // 2-letter country code
projectId: 'your_project_id', // Your project ID
phone: '1234567890', // Phone number to send OTP to
key: 'your_api_key', // Your API key
);
print('OTP Sent: $sendOTPResponse');
final verifyOTPResponse = await otpService.verifyOtp(
country: 'dz', // 2-letter country code
phone: '1234567890', // Phone number to verify
projectId: 'your_project_id', // Your project ID
otp: '123456', // OTP to verify
key: 'your_api_key', // Your API key
);
print('OTP Verified: $verifyOTPResponse');
}