This package wraps Airtime, Sms, and Voice call from Africa's Talking APIs.

Overview

This package wraps some functionalities from Africa's Talking API The functionalities implemented are;

  1. Sms
  • send message
  • fetch messages
  • generate checkout token
  • subscribe phone number
  • fetch subscriptions
  • delete a subscription
  1. Airtime
  • send airtime
  • check airtime transaction status
  1. Voice cal;
  • make a call

Usage

import 'package:africas_talking/africas_talking.dart';

main() {
  var africasTalking = AfricasTalking('YourUsername', key);

  // set to false when testing 
  africasTalking.isLive = false;

  // ***Sms***
  // initialize sms; Takes your registered short code or alphanumeric, defaults to AFRICASTKNG
  Sms sms = africasTalking.sms('ShortCode');
  
  // send sms
  sms.send(message: "Hello world", to: ['+XXXXXXXXXXXX']);
  // fetch messages
  sms.fetchMessages(lastReceivedId: '0');


  // ***Airtime***
  // initialize airtime
  Airtime airtime = africasTalking.airtime();

  // send airtime; takes a List of AirtimeRecipient
  airtime.send([AirtimeRecipient(amount: 20, phoneNo: '+XXXXXXXXXXXX', currency: 'KES')]);


  // ***Voice call***
  // initialize voice call; takes  Your Africa’s Talking phone number
  VoiceCall voiceCall = africasTalking.voiceCall('+XXXXXXXXXXXX');

  // make a call; takes a list of phone numbers
  voiceCall.call(to: ['+XXXXXXXXXXXX']);
}
You might also like...

A Dart package to web scraping data from websites easily and faster using less code lines.

Chaleno A flutter package to webscraping data from websites This package contains a set of high-level functions that make it easy to webscrap websites

Dec 29, 2022

A package that helps with encoding and decoding of geohashes.

A package that helps with encoding and decoding of geohashes.

georange Georange is a package that helps with encoding geohashes, decoding geohashes,calculating distance between 2 points and generating latitudinal

Feb 17, 2022

Let's Encrypt support for the shelf package (free and automatic HTTPS certificate support).

shelf_letsencrypt shelf_letsencrypt brings support for Let's Encrypt to the shelf package. Usage To use the LetsEncrypt class import 'dart:io'; impor

Oct 31, 2022

Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.

Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.

Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.

Dec 13, 2022

A dart package for decode and encode emv QR code

A dart package for decode and encode emv QR code

Nov 15, 2022

WhatsApp API package for flutter, to send message and product information.

WhatsApp API package for flutter, to send message and product information.

WhatsApp API package for flutter, to send message and product information. Platform Support Android iOS MacOS Web Linux Windows ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ What

Nov 11, 2022

This is a simple class to package up and send requests to the Kroki.io web service.

Kroki.dart This is a simple class to package up and send requests to the Kroki.io web service. A live editor to editing diagrams that Kroki supports c

Jun 8, 2022

Dio Package in Flutter - HTTP Requests and Interceptors.

Dio Package in Flutter - HTTP Requests and Interceptors.

Dio Package in Flutter - HTTP Requests and Interceptors. Learn how to use Flutter Dio package to make http requests, deal with interceptors and take care of unexpected server responses and failures in Flutter apps.

Nov 18, 2022

Dart package for random strings and numbers, with weights

randomness Dart package for random strings and numbers, with weights Random strings, numbers. RNG with weights. Cryptographically secure options. Gett

Aug 6, 2022
Owner
Eddie Genius
Eddie Genius
The diozz package helps you to deal with APIs easily and speed up the process of writing code.

Diozz The diozz package helps you to deal with APIs easily and speed up the process of writing code. Installation Diozz Use that command in the termin

Mohamed Abu.elezz 4 Nov 13, 2022
Functional programming essentials for Dart. Tail call optimization, partial application, memoization, and more.

Pure is a Dart package that brings functional programming essentials through extension methods. It offers function composition/pipes, function memoization, partial application, and recursion trampolines.

Yakov Karpov 10 Oct 27, 2022
Call OpenGL ES Api By Dart

Flutter GL Flutter GL can call OpenGL ES API with Dart Support iOS,Android,Web OpenGL ES API Now the api is similar to WebGL How to use Now this is on

zhaolei 163 Jan 5, 2023
The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs. Inspired by SwiftGen. Motivation Using asset path str

FlutterGen 1.1k Jan 6, 2023
A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully

Muhammad Hamza 20 Jun 7, 2022
null 2 Apr 17, 2022
A Dart package which supports checking if a current package is up-to-date.

pub_updater A Dart package which enables checking whether packages are up to date and supports updating them. Intended for use in CLIs for prompting u

Very Good Open Source 47 Oct 27, 2022
A flutter package provides controllers and editors for complex models and lists

This package provides controllers and editors for complex models and lists and is inspired by simplicity of TextEditingController. It encapsulates sta

null 2 Sep 1, 2022
A dart package to help you parse and evaluate infix mathematical expressions into their prefix and postfix notations.

A dart package to help you parse and evaluate infix mathematical expressions into their prefix and postfix notations.

Miguel Manjarres 2 Jan 28, 2022