Fluid SDK
A Flutter package for handling payment flows.
Features
- 🔄 Payment flow management
- 💳 Multiple payment methods support
- 🎨 Customizable UI interface
- 📱 Cross-platform support (iOS & Android)
Installation
Add the dependency to your pubspec.yaml:
dependencies:
fluid_sdk: ^0.1.0
Getting Started
1. Initialize SDK
import 'package:fluid_sdk/fluid_sdk.dart';
void main() async {
await initialize(
FluidEnv.test,
'YOUR_API_KEY',
AssetImage('images/your_logo.png'), // Optional logo
);
runApp(MyApp());
}
2. Launch Payment Flow
// Launch payment flow
final result = await launchPayment(context, 'payment_ticket');
if (result != null) {
// Handle payment result
print('Payment status: ${result.status}');
}
Environment Configuration
The SDK provides predefined environments:
FluidEnv.test- Test environment
Main Components
- PaymentOrder - Payment order model
- PaymentMethod - Payment method model
- PaymentStatus - Payment status enum
Example
Check the example/ directory for complete usage examples.
License
This project is licensed under the MIT License.