diff --git a/packages/stripe/lib/src/widgets/apple_pay_button.dart b/packages/stripe/lib/src/widgets/apple_pay_button.dart index 8ad31247b..58535bf5c 100644 --- a/packages/stripe/lib/src/widgets/apple_pay_button.dart +++ b/packages/stripe/lib/src/widgets/apple_pay_button.dart @@ -14,7 +14,7 @@ const double _kApplePayButtonDefaultHeight = 48; class ApplePayButton extends StatelessWidget { ApplePayButton({ - Key? key, + super.key, this.style = PlatformButtonStyle.automatic, this.type = PlatformButtonType.plain, this.cornerRadius = 4, @@ -30,8 +30,7 @@ class ApplePayButton extends StatelessWidget { constraints = (width != null || height != null) ? constraints?.tighten(width: width, height: height) ?? BoxConstraints.tightFor(width: width, height: height) - : constraints, - super(key: key); + : constraints; /// Style of the the apple payment button. /// @@ -113,7 +112,6 @@ class ApplePayButton extends StatelessWidget { class _UiKitApplePayButton extends StatefulWidget { const _UiKitApplePayButton({ - Key? key, required this.style, required this.type, this.cornerRadius = 4, @@ -122,7 +120,7 @@ class _UiKitApplePayButton extends StatefulWidget { this.onCouponCodeEntered, this.onShippingMethodSelected, this.onOrderTracking, - }) : super(key: key); + }); final PlatformButtonStyle style; final PlatformButtonType type; diff --git a/packages/stripe/lib/src/widgets/aubecs_debit_form.dart b/packages/stripe/lib/src/widgets/aubecs_debit_form.dart index dd63df90c..7ce2dce00 100644 --- a/packages/stripe/lib/src/widgets/aubecs_debit_form.dart +++ b/packages/stripe/lib/src/widgets/aubecs_debit_form.dart @@ -11,8 +11,8 @@ class AubecsFormField extends StatelessWidget { this.style, this.companyName, this.controller, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { @@ -36,8 +36,7 @@ class _AubecsFormField extends StatefulWidget { this.style, this.companyName, this.controller, - Key? key, - }) : super(key: key); + }); @override _AubecsFormFieldState createState() => _AubecsFormFieldState(); diff --git a/packages/stripe/lib/src/widgets/card_field.dart b/packages/stripe/lib/src/widgets/card_field.dart index f599d368c..2fe16c9fd 100644 --- a/packages/stripe/lib/src/widgets/card_field.dart +++ b/packages/stripe/lib/src/widgets/card_field.dart @@ -14,7 +14,7 @@ import 'keep_visible_on_focus.dart'; class CardField extends StatefulWidget { const CardField({ this.onCardChanged, - Key? key, + super.key, this.onFocus, this.decoration, this.enablePostalCode = false, @@ -33,7 +33,7 @@ class CardField extends StatefulWidget { this.preferredNetworks, this.androidPlatformViewRenderType = AndroidPlatformViewRenderType.expensiveAndroidView, - }) : super(key: key); + }); /// Decoration related to the input fields. final InputDecoration? decoration; @@ -282,7 +282,6 @@ class _MethodChannelCardField extends StatefulWidget { this.onCardChanged, required this.controller, required this.androidPlatformViewRenderType, - Key? key, this.onFocus, this.style, this.placeholder, @@ -301,8 +300,7 @@ class _MethodChannelCardField extends StatefulWidget { constraints = (width != null || height != null) ? constraints?.tighten(width: width, height: height) ?? BoxConstraints.tightFor(width: width, height: height) - : constraints, - super(key: key); + : constraints; final BoxConstraints? constraints; final CardFocusCallback? onFocus; @@ -613,12 +611,12 @@ class _MethodChannelCardFieldState extends State<_MethodChannelCardField> class _AndroidCardField extends StatelessWidget { const _AndroidCardField({ - Key? key, required this.viewType, required this.creationParams, required this.onPlatformViewCreated, required this.androidPlatformViewRenderType, - }) : super(key: key); + super.key, + }); final AndroidPlatformViewRenderType androidPlatformViewRenderType; final String viewType; @@ -673,11 +671,11 @@ class _AndroidCardField extends StatelessWidget { class _UiKitCardField extends StatelessWidget { const _UiKitCardField({ - Key? key, required this.viewType, required this.creationParams, required this.onPlatformViewCreated, - }) : super(key: key); + super.key, + }); final String viewType; final Map creationParams; diff --git a/packages/stripe/lib/src/widgets/card_form_field.dart b/packages/stripe/lib/src/widgets/card_form_field.dart index 268485037..2a2fbfa2e 100644 --- a/packages/stripe/lib/src/widgets/card_form_field.dart +++ b/packages/stripe/lib/src/widgets/card_form_field.dart @@ -20,7 +20,6 @@ import 'keep_visible_on_focus.dart'; class CardFormField extends StatefulWidget { const CardFormField({ this.onCardChanged, - Key? key, this.onFocus, this.enablePostalCode = true, this.countryCode, @@ -31,7 +30,8 @@ class CardFormField extends StatefulWidget { this.disabled = false, this.controller, this.preferredNetworks, - }) : super(key: key); + super.key, + }); /// Callback that will be executed when a specific field gets focus. final CardFocusCallback? onFocus; @@ -216,7 +216,6 @@ class _MethodChannelCardFormField extends StatefulWidget { _MethodChannelCardFormField({ this.onCardChanged, required this.controller, - Key? key, this.onFocus, this.style, this.enablePostalCode = true, @@ -234,8 +233,7 @@ class _MethodChannelCardFormField extends StatefulWidget { constraints = (width != null || height != null) ? constraints?.tighten(width: width, height: height) ?? BoxConstraints.tightFor(width: width, height: height) - : constraints, - super(key: key); + : constraints; final BoxConstraints? constraints; final CardFocusCallback? onFocus; @@ -526,11 +524,11 @@ class _MethodChannelCardFormFieldState class _AndroidCardFormField extends StatelessWidget { const _AndroidCardFormField({ - Key? key, required this.viewType, required this.creationParams, required this.onPlatformViewCreated, - }) : super(key: key); + super.key, + }); final String viewType; final Map creationParams; @@ -568,11 +566,11 @@ class _AndroidCardFormField extends StatelessWidget { class _UiKitCardFormField extends StatelessWidget { const _UiKitCardFormField({ - Key? key, required this.viewType, required this.creationParams, required this.onPlatformViewCreated, - }) : super(key: key); + super.key, + }); final String viewType; final Map creationParams; diff --git a/packages/stripe/lib/src/widgets/google_pay_button.dart b/packages/stripe/lib/src/widgets/google_pay_button.dart index 12423fa48..c5970b426 100644 --- a/packages/stripe/lib/src/widgets/google_pay_button.dart +++ b/packages/stripe/lib/src/widgets/google_pay_button.dart @@ -12,8 +12,8 @@ class GooglePayButton extends StatefulWidget { this.buttonType = PlatformButtonType.pay, this.borderRadius, this.appearance = PlatformButtonStyle.automatic, - Key? key, - }) : super(key: key); + super.key, + }); static const _viewType = 'flutter.stripe/google_pay_button'; diff --git a/packages/stripe/lib/src/widgets/keep_visible_on_focus.dart b/packages/stripe/lib/src/widgets/keep_visible_on_focus.dart index 0869a8bb8..91495d6bb 100644 --- a/packages/stripe/lib/src/widgets/keep_visible_on_focus.dart +++ b/packages/stripe/lib/src/widgets/keep_visible_on_focus.dart @@ -3,10 +3,10 @@ import 'package:flutter/widgets.dart'; class KeepVisibleOnFocus extends StatefulWidget { const KeepVisibleOnFocus({ - Key? key, required this.focusNode, required this.child, - }) : super(key: key); + super.key, + }); final FocusNode focusNode; diff --git a/packages/stripe/pubspec.yaml b/packages/stripe/pubspec.yaml index f96dfecf5..f456122cf 100644 --- a/packages/stripe/pubspec.yaml +++ b/packages/stripe/pubspec.yaml @@ -28,4 +28,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.1 + flutter_lints: ^4.0.0 diff --git a/packages/stripe_android/pubspec.yaml b/packages/stripe_android/pubspec.yaml index 520b7eaad..bab1979ff 100644 --- a/packages/stripe_android/pubspec.yaml +++ b/packages/stripe_android/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^1.0.3 + flutter_lints: ^4.0.0 flutter: plugin: diff --git a/packages/stripe_ios/pubspec.yaml b/packages/stripe_ios/pubspec.yaml index f9b6235e0..ccf22b3d3 100644 --- a/packages/stripe_ios/pubspec.yaml +++ b/packages/stripe_ios/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^1.0.3 + flutter_lints: ^4.0.0 flutter: plugin: diff --git a/packages/stripe_js/pubspec.yaml b/packages/stripe_js/pubspec.yaml index 40357307e..c0f7ceb59 100644 --- a/packages/stripe_js/pubspec.yaml +++ b/packages/stripe_js/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: freezed_annotation: ^2.2.0 json_annotation: ^4.8.1 meta: ^1.0.0 - web: ^0.5.1 + web: ^1.0.0 dev_dependencies: build_runner: ^2.3.2 diff --git a/packages/stripe_js/test/src/js/helpers/stripe_element_helper.dart b/packages/stripe_js/test/src/js/helpers/stripe_element_helper.dart index b530ea065..50c35eacf 100644 --- a/packages/stripe_js/test/src/js/helpers/stripe_element_helper.dart +++ b/packages/stripe_js/test/src/js/helpers/stripe_element_helper.dart @@ -26,7 +26,6 @@ extension ElementWaitFor on web.Element { String selectors, { Duration timeout = const Duration(seconds: 2), }) async { - web.console.log(this.innerHTML.toJS); final element = this.querySelector(selectors); if (element != null) { return element; diff --git a/packages/stripe_platform_interface/pubspec.yaml b/packages/stripe_platform_interface/pubspec.yaml index 571928add..6cd99f778 100644 --- a/packages/stripe_platform_interface/pubspec.yaml +++ b/packages/stripe_platform_interface/pubspec.yaml @@ -22,4 +22,4 @@ dev_dependencies: sdk: flutter freezed: ^2.4.5 json_serializable: ^6.7.1 - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 diff --git a/packages/stripe_web/pubspec.yaml b/packages/stripe_web/pubspec.yaml index 52600f693..68819b989 100644 --- a/packages/stripe_web/pubspec.yaml +++ b/packages/stripe_web/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: freezed_annotation: ^2.0.3 stripe_platform_interface: ^11.0.0 stripe_js: ^6.0.0 - web: ^0.5.1 + web: ^1.0.0 dev_dependencies: flutter_test: @@ -23,7 +23,7 @@ dev_dependencies: build_runner: ^2.3.2 freezed: ^2.3.5 json_serializable: ^6.5.4 - lints: ^2.0.1 + lints: ^4.0.0 flutter: plugin: