nexora_chai_flutter 1.0.0
nexora_chai_flutter: ^1.0.0 copied to clipboard
The official Nexora Chai SDK for Flutter. Accept M-Pesa tips in your mobile app with a single line of code.
nexora_chai_flutter #
The official Nexora Chai Flutter SDK. Accept M-Pesa tips in your mobile app with a single line of code.
🚀 Installation #
Add this to your pubspec.yaml:
dependencies:
nexora_chai_flutter: ^1.0.0
🛠️ Usage #
import 'package:nexora_chai_flutter/nexora_chai_flutter.dart';
void _startChaiCheckout(BuildContext context) {
showDialog(
context: context,
barrierDismissible: false,
builder: (context) => ChaiCheckoutView(
username: 'nexora',
amount: 100.0,
onCompleted: () {
print("Success!");
Navigator.pop(context);
},
onCanceled: () {
print("Canceled");
},
),
);
}
⚙️ Configuration #
Android #
Ensure you have internet permissions in android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
iOS #
Add the following to your ios/Runner/Info.plist to allow the checkout WebView:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>