stripe_api 1.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 88

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.

1.1.0 #

  • Updated 'http' package version

1.0.3 #

  • CardNumberFormatter code refactored

1.0.2 #

  • Fixed minor issue

1.0.1 #

  • Completed CardNumberFormatter class

1.0.0 #

  • Fixed publish --dry-run issues/warnings

0.0.1 #

  • Initial release

example/README.md

example #

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:

with Flutter:


$ 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:


import 'package:stripe_api/stripe_api.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
84
Health:
Code health derived from static analysis. [more]
87
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
99
Overall:
Weighted score of the above. [more]
88
Learn more about scoring.

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

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/model/card.dart. (-3.93 points)

Analysis of 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.

Fix lib/model/stripe_json_utils.dart. (-2.48 points)

Analysis of 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.

Fix lib/card_utils.dart. (-1.49 points)

Analysis of 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:

  • lib/model/model_utils.dart (3 hints)
  • lib/stripe_text_utils.dart (3 hints)
  • lib/card_number_formatter.dart (1 hint)
  • lib/model/source.dart (1 hint)
  • lib/model/token.dart (1 hint)
  • lib/stripe_api.dart (1 hint)
  • lib/stripe_network_utils.dart (1 hint)

Maintenance suggestions

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.61.0 <3.0.0
flutter 0.0.0
http ^0.12.0 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test