darbirdsms 0.0.7
darbirdsms: ^0.0.7

Flutter Android iOS

Darbird Client Library for Darbird SMS REST API Service https://console.darbird.com

darbirdsdk ✉️ #

Darbird SMS library for Dart. Based on the Official API Documentation provided by Darbird.

Installation #

Add Darbird as a dependency in your pubspec.yaml file.

darbirdsdk: ^0.0.7

Usage #

Import the library in your dart file.

import 'package:darbirdsdk/darbirdsdk';

Initialize SMS #

Darbird darbird = Darbird.initialize(
    apikey: 'API_KEY',
    cusId: 'CUSTOMER_ID',
    senderID: 'SENDER_ID',
);

Send SMS #

This lets you make a request to send an SMS to the Darbird API. It returns a type Response containing the message status, ID and number of SMS credits used.

var smsDetails = await darbird.sendSMS(to: "234xxxxxxxx", message: "Darbird test", unicode: "1");
print(smsDetails.messageID);

Send Voice #

This lets you make a request to send an Voice Call to the Darbird API. It returns a type Response containing the message status, ID and number of SMS credits used.

var smsDetails = await darbird.sendVoice(to: "234xxxxxxxx", message: "Darbird test");
print(smsDetails.messageID);

Send MMS #

This lets you make a request to send an MMS to the Darbird API. It returns a type Response containing the message status, ID and number of SMS credits used.

var smsDetails = await darbird.sendMMS(to: "234xxxxxxxx", message: "Darbird test",unicode: "1",media_url:"https://console.darbird.com/assets/client_pic/profile.jpg");
print(smsDetails.messageID);

Send Authty #

This lets you make a request to send an Authty to the Darbird API. It returns a type Response containing the message Verification Code Sent.

var smsDetails = await darbird.sendAuthty(to_number: "234xxxxxxxx", token_lenght: "4",message: "",type: "1");
print(smsDetails.messageID);

Verify Authty #

This lets you make a request to Verify Authty on Darbird API. It returns a type Response containing the message verification successful.

var smsDetails = await darbird.verifyAuthty(to_number: "234xxxxxxxx", auth_code: "4");
print(smsDetails.messageID);

Otp Timer added #

Get easy Darbird otp timer in your app while sms is sent


void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Otp Timer"),
        centerTitle: true,
      ),
      body: Center(
        child: DarbirdOtpTimer(
          duration: 60, // time till which the timer should animate
          radius: 10, // size of the circle
          timeTextSize: 16, // time text inside the circle
        ),
      ),
    );
  }
}

Contributing #

Please feel free to fork this package and contribute by submitting a pull request to enhance its functionalities.

How can I thank you? #

Just star and share the repo 🙂.

3
likes
80
pub points
27%
popularity

Darbird Client Library for Darbird SMS REST API Service https://console.darbird.com

Homepage

Documentation

API reference

Uploader

darimatltd@gmail.com

License

MIT (LICENSE)

Dependencies

dio, flutter, meta

More

Packages that depend on darbirdsms