flutter_stripe 11.2.0 flutter_stripe: ^11.2.0 copied to clipboard
Flutter library for Stripe. Supports PaymentSheets, Apple & Google Pay, SCA, PSD2 and much more.
Usage example #
// main.dart
import 'package:flutter_stripe/flutter_stripe.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// set the publishable key for Stripe - this is mandatory
Stripe.publishableKey = stripePublishableKey;
runApp(App());
}
// payment_screen.dart
class PaymentScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(16),
child: CardField(
onCardChanged: (card) {
print(card);
},
),
),
);
}
}
Check a full example app here