btc_stripe_payment 0.0.2
btc_stripe_payment: ^0.0.2 copied to clipboard
personal use
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:stripe_payment_flutter/stripe_payment_flutter.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
StripePaymentFlutter.initialiseStripe(
publishKey:
"pk_test_51Ml9d4SJhjcnoOIBhjJOWQGbSCZeg6PqtjRIZAvyW9aNWCBzLkzOJHBIgbeQ47M3j7vGxQOieDqIQevd4mJypOkL00KJwUu428");
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return GetMaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: InkWell(
onTap: () {
StripePaymentFlutter.makePayment(
fees: 2000.10,
secretKey:
"sk_test_51Ml9d4SJhjcnoOIBPhomjd9L6vb4zrOnMrV4loueIrRmkMQirg29lG6kJ08wf5nkwtTetsCwWcVIVUNo4ZoG9Zwz00k3obxOT8");
},
child: Text('Running on')),
),
),
);
}
}