|
1 | 1 | # SVM-Pay Mobile SDK Build Configuration |
2 | 2 |
|
3 | | -This directory contains the build configuration for the SVM-Pay mobile SDKs for iOS and Android. |
| 3 | +This directory contains the build configuration for the SVM-Pay mobile SDKs for iOS, Android, and Flutter. |
| 4 | + |
| 5 | +## Flutter SDK 🎯 |
| 6 | + |
| 7 | +The Flutter SDK provides cross-platform support for both iOS and Android with a single codebase. |
| 8 | + |
| 9 | +### Requirements |
| 10 | + |
| 11 | +- Flutter 3.3.0 or later |
| 12 | +- Dart 3.8.1 or later |
| 13 | +- iOS 13.0 or later (for iOS builds) |
| 14 | +- Android API level 21 or later (for Android builds) |
| 15 | + |
| 16 | +### Installation |
| 17 | + |
| 18 | +Add to your `pubspec.yaml`: |
| 19 | + |
| 20 | +```yaml |
| 21 | +dependencies: |
| 22 | + svm_pay: ^1.1.0 |
| 23 | +``` |
| 24 | +
|
| 25 | +### Quick Start |
| 26 | +
|
| 27 | +```dart |
| 28 | +import 'package:svm_pay/svm_pay.dart'; |
| 29 | + |
| 30 | +final svmPay = SVMPay( |
| 31 | + config: const SVMPayConfig( |
| 32 | + defaultNetwork: SVMNetwork.solana, |
| 33 | + debug: true, |
| 34 | + ), |
| 35 | +); |
| 36 | + |
| 37 | +// Use payment widgets |
| 38 | +PaymentButton( |
| 39 | + recipient: 'recipient_address', |
| 40 | + amount: '1.0', |
| 41 | + onPayment: (result) async { |
| 42 | + // Handle payment result |
| 43 | + }, |
| 44 | +) |
| 45 | +``` |
| 46 | + |
| 47 | +### Building from Source |
| 48 | + |
| 49 | +The Flutter SDK is included in this repository at `flutter_sdk/`. |
| 50 | + |
| 51 | +```bash |
| 52 | +cd flutter_sdk |
| 53 | +flutter pub get |
| 54 | +flutter test |
| 55 | +``` |
| 56 | + |
| 57 | +To run the example app: |
| 58 | + |
| 59 | +```bash |
| 60 | +cd flutter_sdk/example |
| 61 | +flutter run |
| 62 | +``` |
| 63 | + |
| 64 | +For complete documentation, see [Flutter SDK README](../flutter_sdk/README.md). |
4 | 65 |
|
5 | 66 | ## iOS SDK |
6 | 67 |
|
@@ -92,4 +153,8 @@ cd svm-pay-android |
92 | 153 |
|
93 | 154 | ## Documentation |
94 | 155 |
|
95 | | -For detailed documentation on how to use the mobile SDKs, please refer to the [SVM-Pay Documentation](../docs/documentation.md#mobile-sdk). |
| 156 | +For detailed documentation on how to use the mobile SDKs, please refer to: |
| 157 | + |
| 158 | +- [Flutter SDK Documentation](../flutter_sdk/README.md) |
| 159 | +- [SVM-Pay Documentation](../docs/documentation.md#mobile-sdk) |
| 160 | +- [Main Project README](../README.md) |
0 commit comments