2023-11-14 15:09:03 -07:00
|
|
|
A simple and clean Stripe Element Card clone, rebuilt in native Flutter widgets.
|
2023-11-08 15:42:09 -07:00
|
|
|
|
2023-11-14 15:09:03 -07:00
|
|
|
This is not an officially maintained package by Stripe, but using the html stripe
|
|
|
|
elements they provide with flutter is less than ideal.
|
2023-11-08 15:42:09 -07:00
|
|
|
|
|
|
|
## Features
|
|
|
|
|
2023-11-14 15:09:03 -07:00
|
|
|
- Card number validation
|
|
|
|
- No more depending on Flutter Webview
|
2023-11-08 15:42:09 -07:00
|
|
|
|
|
|
|
## Getting started
|
|
|
|
|
2023-11-14 15:09:03 -07:00
|
|
|
- Install the package by running `flutter pub add stripe_native_card_field`
|
2023-11-08 15:42:09 -07:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2023-11-14 15:09:03 -07:00
|
|
|
Include the package in a file:
|
|
|
|
|
|
|
|
```dart
|
|
|
|
import 'package:stripe_native_card_field/stripe_native_card_field.dart';
|
|
|
|
```
|
2023-11-08 15:42:09 -07:00
|
|
|
|
|
|
|
```dart
|
2023-11-14 15:09:03 -07:00
|
|
|
CardTextField(
|
|
|
|
width: 500,
|
|
|
|
onCardDetailsComplete: (details) {
|
|
|
|
// Save the card details to use with your call to Stripe, or whoever
|
|
|
|
setState(() => _cardDetails = details);
|
|
|
|
},
|
|
|
|
);
|
2023-11-08 15:42:09 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
## Additional information
|
|
|
|
|
2023-11-14 15:09:03 -07:00
|
|
|
Repository located [here](https://git.fosscat.com/n8r/stripe_native_card_field)
|