flutter_dexchange_sms 0.0.3 copy "flutter_dexchange_sms: ^0.0.3" to clipboard
flutter_dexchange_sms: ^0.0.3 copied to clipboard

Flutter package for dexchange sms API, you can send SMS, send OTP and verify it.

example/README.md

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
}

1
likes
130
pub points
42%
popularity

Publisher

unverified uploader

Flutter package for dexchange sms API, you can send SMS, send OTP and verify it.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

either_dart, flutter, http

More

Packages that depend on flutter_dexchange_sms