Skip to main content

gatewire 1.0.1 copy "gatewire: ^1.0.1" to clipboard
gatewire: ^1.0.1 copied to clipboard

Official Flutter SDK for the GateWire decentralized SMS infrastructure.

example/main.dart

import 'package:gatewire/gatewire.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
145
points
22
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

More

Packages that depend on gatewire