stripedart 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 63

Stripe Dart Library #

The Stripe Dart library provides convenient access to the Stripe API from applications written in server-side Dart.

For collecting customer and payment information in Flutter app, use our Stripe Flutter SDK.

Documentation #

See the stripe-node API docs for Node.js.

Usage #

The package needs to be configured with your account's secret key, which is available in the Stripe Dashboard. Require it with the key's value:

var stripe = Stripe('sk_test_...');
var result = await stripe.core.customers.create(params: {
  "email": 'customer@example.com',
});

Configuration #

Initialize with config object #

The package can be initialized with several options:

var stripe = Stripe('sk_test_...', {
  apiVersion: '2020-03-02'
});
OptionDefaultDescription
apiVersionnullStripe API version to be used. If not set the account's default version will be used.

[1.0.2] - 27-05-2020 #

  • Bug fix.

[1.0.1] - 16-05-2020 #

  • Bug fix.

[1.0.0] - 14-05-2020 #

  • Bug fix.

[0.0.1] - 14-05-2020 #

  • Initial release.

example/main.dart

import 'package:stripedart/stripedart.dart';

Future<void> main() async {
  var stripe = Stripe('sk_test_...');
  var result = await stripe.core.customers.create(params: {
    "email": 'customer@example.com',
  });
  print(result);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  stripedart: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:stripedart/stripedart.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
27
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
63
Learn more about scoring.

We analyzed this package on Jul 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15

Analysis suggestions

Package not compatible with runtime flutter-web on Web

Because:

  • package:stripedart/stripedart.dart that imports:
  • package:stripedart/src/api/stripe.dart that imports:
  • package:stripedart/src/api/resources/core_resources/core.dart that imports:
  • package:stripedart/src/api/resources/core_resources/files.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:stripedart/stripedart.dart that imports:
  • package:stripedart/src/api/stripe.dart that imports:
  • package:stripedart/src/api/resources/core_resources/core.dart that imports:
  • package:stripedart/src/api/resources/core_resources/files.dart that imports:
  • dart:io

Health issues and suggestions

Document public APIs. (-0.95 points)

3052 out of 3057 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
http ^0.12.1 0.12.1
json_annotation ^3.0.0 3.0.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
http_parser 3.1.4
meta 1.2.2 1.3.0-nullsafety
path 1.7.0
pedantic 1.9.2
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety
Dev dependencies
build_runner ^1.0.0
json_serializable ^3.3.0
test ^1.14.3