Flutter Stripe API #
A flutter plugin to integrate stripe into flutter app. There are other pluging available but I tried a different approach. (This plugin not dependent on any other native stripe library) I start to follow the official Android stripe SDK and replicate it's code into Dart. So far I completed the basic functions which includes:
- Start Customer Session
- End Customer Session
- Get Customer
- Create Card Token
- Add Customer Source
- Remove Customer Source
- Update Default Source
- Update Customer Shipping Information (not tested)
This plugin is in very initial stage, I am using it in my personal app. Future plan is to complete all the remaining API. And completing the Example Project with proper UI. And also having a TextInputFormatter for card auto complete and validation.
- Updated 'http' package version
- CardNumberFormatter code refactored
- Fixed minor issue
- Completed CardNumberFormatter class
- Fixed publish --dry-run issues/warnings
- Initial release
Stripe API usage example
Getting Started #
For help getting started with Flutter, view our online documentation.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: stripe_api: ^1.1.0
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Oct 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.4
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
lib/model/card.dart. (-3.93 points)
lib/model/card.dart reported 8 hints, including:
line 202 col 3: Prefer using /// for doc comments.
line 211 col 3: Prefer using /// for doc comments.
line 220 col 3: Prefer using /// for doc comments.
line 230 col 3: Prefer using /// for doc comments.
line 249 col 3: Prefer using /// for doc comments.
lib/model/stripe_json_utils.dart. (-2.48 points)
lib/model/stripe_json_utils.dart reported 5 hints:
line 4 col 1: Prefer using /// for doc comments.
line 17 col 1: Prefer using /// for doc comments.
line 29 col 1: Prefer using /// for doc comments.
line 41 col 1: Prefer using /// for doc comments.
line 57 col 1: Prefer using /// for doc comments.
lib/card_utils.dart. (-1.49 points)
lib/card_utils.dart reported 3 hints:
line 15 col 1: Prefer using /// for doc comments.
line 28 col 1: Prefer using /// for doc comments.
line 65 col 1: Prefer using /// for doc comments.
Fix additional 7 files with analysis or formatting issues. (-5.48 points)
Additional issues in the following files:
The package description is too short. (-1 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.
|Dart SDK||>=2.0.0-dev.61.0 <3.0.0|