smsalert 0.1.1 copy "smsalert: ^0.1.1" to clipboard
smsalert: ^0.1.1 copied to clipboard

outdated

A Dart package which helps developers with SMSAlert API services.

example/main.dart

import 'dart:io' show Platform;

import 'package:smsalert/smsalert.dart';

Future<void> main() async {
  String _user = Platform.environment['SMSALERT_ACCOUNT_USERNAME'];
  String _pwd = Platform.environment['SMSALERT_ACCOUNT_PASSWORD'];

  // Your SMSAlert account username and password
  // You can skip this block if you store your credentials in environment variables
  _user ??= 'SMSALERT_ACCOUNT_USERNAME';
  _pwd ??= 'SMSALERT_ACCOUNT_PASSWORD';

  // Create an authenticated SMSAlert sa instance
  SMSAlert sa = new SMSAlert(_user, _pwd);

  // Send a text message
  // Returns a Map object (key/value pairs)
  Map message = await sa.messages.sendsms({
    'text': 'Hello from Dart!', //SMS text
    'sender': 'ESTORE', // a valid sender ID
    'mobileno': '+918010551055', // your destination phone number
    'route': 'demo' //to select route
  });

  print(message);
}
3
likes
0
pub points
24%
popularity

Publisher

verified publishercozyvision.com

A Dart package which helps developers with SMSAlert API services.

Homepage

License

unknown (LICENSE)

Dependencies

http

More

Packages that depend on smsalert