flutter_dexchange_sms

Last updated:

0 purchases

flutter_dexchange_sms Image
flutter_dexchange_sms Images
Add to Cart

Description:

flutter dexchange sms

Flutter Dexchange SMS #
A flutter package for sending SMS messages using the Dexchange SMS API
Features #

Send SMS Message
Send a one-time password (OTP)
Verify OTP

Installation #

Add the latest version of package to your pubspec.yaml (and run flutter pub get flutter_dexchange_sms):

dependencies:
flutter_dexchange_sms: ^0.0.3
copied to clipboard

Import the package and use it in your Flutter App.

import 'package:flutter_dexchange_sms/flutter_dexchange_sms.dart';
copied to clipboard
Usage #
import 'package:flutter_dexchange_sms/flutter_dexchange_sms.dart';

FlutterDexchangeSms dexchangeSms = FlutterDexchangeSms(apiKey: 'YOUR API KEY');

// To send an sms

try {
SendSmsResponse response = dexchangeSms.sendSms(request: SendSmsRequest(
number: ["221777460452", "777460452"],
signature: "DSMS",
content: "YO\nCV ?"
));
} on DexchangeApiException catch(e) {
print(e.toString()); // Handle the exception here
}

// To send otp sms

try {
SendOTPResponse response = dexchangeSms.sendOTP(request: SendOTPRequest(
number: "221777460452",
service: "DEMO",
lang: "en" // this field is optional
));
} on DexchangeApiException catch(e) {
print(e.toString()); // Handle the exception here
}

// To verifty OTP

try {
SendVerifyOTPResponse response = dexchangeSms.sendVerifyOTP(request: SendVerifyOTPRequest(
number: "221777460452",
service: "DEMO",
otp: "214045"
));
} on DexchangeApiException catch(e) {
print(e.toString()); // Handle the exception here
}

copied to clipboard
Additional information #

You can find the documentation on this link.
Get your api key by creating an account on this link.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.