gatewire_dart 1.0.3 copy "gatewire_dart: ^1.0.3" to clipboard
gatewire_dart: ^1.0.3 copied to clipboard

Official Flutter SDK for the GateWire decentralized SMS infrastructure.

GateWire Flutter SDK #

The official Flutter plugin for the GateWire SMS Infrastructure.

Easily integrate SMS notifications, OTPs, and alerts into your Flutter Android & iOS applications using our decentralized mesh network.

Features #

  • 🚀 Cross-Platform: Works on Android, iOS, Web, and Desktop.
  • 🇩🇿 Local Optimized: Designed for reliable delivery to Mobilis, Djezzy, and Ooredoo.
  • 🛡️ Type Safe: Full typed models for responses and errors.

Installation #

Add this to your pubspec.yaml:

dependencies:
  gatewire: ^1.0.3

Usage #

1. Initialization #

import 'package:gatewire_dart/gatewire_dart.dart';

final gatewire = GateWireClient(apiKey: 'sk_live_YOUR_KEY_HERE');

2. Sending an OTP #

try {
  final response = await gatewire.dispatch(
    phone: '+213555123456', 
  );
  
  print('SMS Sent! Ref ID: ${response.referenceId}');
  
} on GateWireException catch (e) {
  print('Failed: ${e.message}');
}

Templates allow you to skip the standard queue (Priority Route).

final response = await gatewire.dispatch(
  phone: '+213555123456',
  templateKey: 'login_otp', // Example configured in client dashboard
);

2. Verify a CODE #

try {
  final response = await gatewire.verifyOtp(
    referenceId: 'REFERENCE_ID_KEY',
    code: 'VERFICATION_CODE' 
  );
  
  print('Verification response : ${response.message}, ${response.status}');
  
} on GateWireException catch (e) {
  print('Failed: ${e.message}');
}

License #

The GateWire flutter package is open-sourced software licensed under the MIT license.

0
likes
0
points
188
downloads

Publisher

unverified uploader

Weekly Downloads

Official Flutter SDK for the GateWire decentralized SMS infrastructure.

Homepage

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on gatewire_dart