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

Official Flutter SDK for the GateWire decentralized SMS infrastructure.

example/main.dart

import 'package:gatewire_dart/gatewire_dart.dart';

void main() async {
  final client = GateWireClient(apiKey: 'your-api-key');

  // Send an OTP
  try {
    final dispatch = await client.dispatch(phone: '+1234567890');
    print('OTP sent! Reference ID: ${dispatch.referenceId}');
    print('Status: ${dispatch.status}');

    // Verify the OTP
    final verification = await client.verifyOtp(
      referenceId: dispatch.referenceId,
      code: '123456',
    );
    print('Verification status: ${verification.status}');
    print('Message: ${verification.message}');
  } on GateWireException catch (e) {
    print('Error: ${e.message} (code: ${e.statusCode})');
  }
}
0
likes
155
points
188
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Official Flutter SDK for the GateWire decentralized SMS infrastructure.

Homepage

License

MIT (license)

Dependencies

flutter, http, ussd_launcher

More

Packages that depend on gatewire_dart