Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add web exports #1957

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/stripe_web/lib/flutter_stripe_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export 'src/widgets/card_field.dart' hide WebStripeCardState;
export 'src/widgets/express_checkout_element.dart'
hide ExpressCheckoutElementState;
export 'src/widgets/payment_element.dart' hide PaymentElementState;
export 'src/widgets/payment_element.dart';
9 changes: 8 additions & 1 deletion packages/stripe_web/lib/src/widgets/payment_element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ import 'package:web/web.dart' as web;
import '../../flutter_stripe_web.dart';

export 'package:stripe_js/stripe_api.dart'
show PaymentElementLayout, ElementAppearance, ElementTheme;
show
PaymentElementLayout,
ElementAppearance,
ElementTheme,
ElementAppearanceLabels;

// TODO: should not use src of other package
export 'package:stripe_js/src/api/elements/payment_element_options.dart';
Copy link
Contributor Author

@cedvdb cedvdb Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some overlaps between stripe_js/api and platform_interface so this file is exported instead. It is not recommended to do this this way. Feel free to not merge this and fix the overlapping exports instead.

In the meantime this allows the usage of the public api of flutter stripe payment element


typedef PaymentElementTheme = js.ElementTheme;

Expand Down
Loading