Steps for integrating Finswich Checkout via Flutter
import 'package:finswich_checkout/finswich_checkout.dart';
import 'package:flutter/widgets.dart';
class MyWidget extends StatefulWidget {
const MyWidget({super.key});
@override
State<MyWidget> createState() => _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
bool isCheckoutVisible = false;
//to pop out the checkout set isCheckoutVisible to true
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(),//the container should be replaced by your code
/// Your widget should go here in place of container (your application)
ischeckoutvisible
? FinswichIframe(
balance: "your_user_balance",
isCheckoutVisible: isCheckoutVisible,
origin: "your_apps_origin",
///To get your origin use this [window.location.origin],
publicKey:
"your_finswich_live_public_key",
reference: "your_user_reference",
refreshUI: () {
setState(() {});
},
)
: const SizedBox(),
],
);
}
}Key
Description
Type
PreviousIntegrating the Finswich Checkout on your Vanilla Javascript appNextPseudocode for Integrating Finswich Checkout in Application (Native iOS & Android)
Last updated
