Skip to main content

afromessage_dart 1.0.4 copy "afromessage_dart: ^1.0.4" to clipboard
afromessage_dart: ^1.0.4 copied to clipboard

unofficial Dart/Flutter client for AfroMessage — Ethiopia's SMS API. Send SMS, bulk SMS, OTPs, and verify security codes.

example/main.dart

import 'package:afromessage_dart/afromessage_dart.dart';

/// Minimal package example for the pub.dev Example tab.
///
/// ```sh
/// dart run example/main.dart
/// ```
Future<void> main() async {
  final sms = AfroMessage(
    const AfroMessageConfig(
      apiKey: 'YOUR_TOKEN',
      senderName: 'YOUR_SENDER',
    ),
  );

  try {
    final to = normalizeEthiopianPhone('0912345678');
    final result = await sms.sendSms(
      SendSmsRequest(to: to, message: 'Hello from afromessage_dart'),
    );
    print(result.isSuccess ? 'Sent: ${result.response?.messageId}' : result);
  } on AfroMessageException catch (e) {
    print(e);
  } finally {
    sms.close();
  }
}
1
likes
160
points
136
downloads
screenshot

Documentation

Documentation
API reference

Publisher

verified publishermiftahfentaw.site

Weekly Downloads

unofficial Dart/Flutter client for AfroMessage — Ethiopia's SMS API. Send SMS, bulk SMS, OTPs, and verify security codes.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#sms #ethiopia #afromessage #otp #flutter

License

BSD-3-Clause (license)

Dependencies

http

More

Packages that depend on afromessage_dart