all_fintech_flutter_sdk 1.1.4 copy "all_fintech_flutter_sdk: ^1.1.4" to clipboard
all_fintech_flutter_sdk: ^1.1.4 copied to clipboard

The most comprehensive Flutter SDK for Nigerian fintech APIs. Integrate Paystack, Flutterwave, Monnify, Opay, and Open Banking with beautiful UI components and enterprise security.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:all_fintech_flutter_sdk/all_fintech_flutter_sdk.dart' hide State;

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'All Fintech SDK Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
      ),
      home: const DemoScreen(),
    );
  }
}

class DemoScreen extends StatefulWidget {
  const DemoScreen({super.key});

  @override
  State<DemoScreen> createState() => _DemoScreenState();
}

class _DemoScreenState extends State<DemoScreen> {
  late AllFintechSDK sdk;

  @override
  void initState() {
    super.initState();
    // Initialize SDK with test credentials
    sdk = AllFintechSDK.initialize(
      provider: FintechProvider.paystack,
      apiKey: 'pk_test_your_paystack_public_key',
      isLive: false,
    );
  }

  Future<void> _processPaystackPayment() async {
    try {
      // Mock successful payment for demo
      ScaffoldMessenger.of(context).showSnackBar(
        const SnackBar(content: Text('Paystack payment demo - Integration ready!')),
      );
    } catch (e) {
      ScaffoldMessenger.of(context).showSnackBar(
        SnackBar(content: Text('Error: $e')),
      );
    }
  }

  Future<void> _processFlutterwavePayment() async {
    try {
      // Mock successful payment for demo
      ScaffoldMessenger.of(context).showSnackBar(
        const SnackBar(content: Text('Flutterwave payment demo - Integration ready!')),
      );
    } catch (e) {
      ScaffoldMessenger.of(context).showSnackBar(
        SnackBar(content: Text('Error: $e')),
      );
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('All Fintech SDK Demo'),
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
      ),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            const Text(
              'Nigerian Fintech Integration Demo',
              style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
              textAlign: TextAlign.center,
            ),
            const SizedBox(height: 32),
            
            ElevatedButton.icon(
              onPressed: _processPaystackPayment,
              icon: const Icon(Icons.payment),
              label: const Text('Pay with Paystack (₦500)'),
              style: ElevatedButton.styleFrom(
                backgroundColor: Colors.green,
                foregroundColor: Colors.white,
                padding: const EdgeInsets.symmetric(vertical: 16),
              ),
            ),
            const SizedBox(height: 16),
            
            ElevatedButton.icon(
              onPressed: _processFlutterwavePayment,
              icon: const Icon(Icons.credit_card),
              label: const Text('Pay with Flutterwave (₦250)'),
              style: ElevatedButton.styleFrom(
                backgroundColor: Colors.orange,
                foregroundColor: Colors.white,
                padding: const EdgeInsets.symmetric(vertical: 16),
              ),
            ),
            const SizedBox(height: 32),
            
            const Card(
              child: Padding(
                padding: EdgeInsets.all(16.0),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      'Supported Providers:',
                      style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
                    ),
                    SizedBox(height: 8),
                    Text('✅ Paystack - Payments, Transfers, Subscriptions'),
                    Text('✅ Flutterwave - Charges, Virtual Accounts'),
                    Text('✅ Monnify - Reserved Accounts, Transfers'),
                    Text('✅ Opay - Payment Channels, Recurring'),
                    Text('✅ Open Banking - Account Data, Savings'),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
65
points
195
downloads

Publisher

unverified uploader

Weekly Downloads

The most comprehensive Flutter SDK for Nigerian fintech APIs. Integrate Paystack, Flutterwave, Monnify, Opay, and Open Banking with beautiful UI components and enterprise security.

Topics

#fintech #payments #nigeria #banking #flutter

Documentation

API reference

License

MIT (license)

Dependencies

crypto, flutter, http, json_annotation, path_provider

More

Packages that depend on all_fintech_flutter_sdk