Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Fix Dart null safety issue with a cast operation (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
johngorithm authored Sep 11, 2023
1 parent 86cdecf commit aa8d42a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/stripe_api/lib/stripe_api_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ class StripeApiHandler {
///
///
///
static Map<String, String?> _headers({RequestOptions? options}) {
final Map<String, String?> headers = new Map();
static Map<String, String> _headers({RequestOptions? options}) {
final Map<String, String> headers = new Map();
headers["Accept-Charset"] = CHARSET;
headers["Accept"] = "application/json";
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand All @@ -220,11 +220,11 @@ class StripeApiHandler {
}

if (options.stripeAccount != null) {
headers["Stripe-Account"] = options.stripeAccount;
headers["Stripe-Account"] = options.stripeAccount!;
}

if (options.idempotencyKey != null) {
headers["Idempotency-Key"] = options.idempotencyKey;
headers["Idempotency-Key"] = options.idempotencyKey!;
}
}

Expand Down

0 comments on commit aa8d42a

Please sign in to comment.