Skip to content

Commit

Permalink
chore: upgrade dependencies to 3.24 and fix analyzer issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Remon committed Aug 19, 2024
1 parent 716dbdf commit 2a71799
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 39 deletions.
8 changes: 3 additions & 5 deletions packages/stripe/lib/src/widgets/apple_pay_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
///
Expand Down Expand Up @@ -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,
Expand All @@ -122,7 +120,7 @@ class _UiKitApplePayButton extends StatefulWidget {
this.onCouponCodeEntered,
this.onShippingMethodSelected,
this.onOrderTracking,
}) : super(key: key);
});

final PlatformButtonStyle style;
final PlatformButtonType type;
Expand Down
7 changes: 3 additions & 4 deletions packages/stripe/lib/src/widgets/aubecs_debit_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -36,8 +36,7 @@ class _AubecsFormField extends StatefulWidget {
this.style,
this.companyName,
this.controller,
Key? key,
}) : super(key: key);
});

@override
_AubecsFormFieldState createState() => _AubecsFormFieldState();
Expand Down
16 changes: 7 additions & 9 deletions packages/stripe/lib/src/widgets/card_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -282,7 +282,6 @@ class _MethodChannelCardField extends StatefulWidget {
this.onCardChanged,
required this.controller,
required this.androidPlatformViewRenderType,
Key? key,
this.onFocus,
this.style,
this.placeholder,
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<String, dynamic> creationParams;
Expand Down
16 changes: 7 additions & 9 deletions packages/stripe/lib/src/widgets/card_form_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -216,7 +216,6 @@ class _MethodChannelCardFormField extends StatefulWidget {
_MethodChannelCardFormField({
this.onCardChanged,
required this.controller,
Key? key,
this.onFocus,
this.style,
this.enablePostalCode = true,
Expand All @@ -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;
Expand Down Expand Up @@ -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<String, dynamic> creationParams;
Expand Down Expand Up @@ -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<String, dynamic> creationParams;
Expand Down
4 changes: 2 additions & 2 deletions packages/stripe/lib/src/widgets/google_pay_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions packages/stripe/lib/src/widgets/keep_visible_on_focus.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion packages/stripe/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.1
flutter_lints: ^4.0.0
2 changes: 1 addition & 1 deletion packages/stripe_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.3
flutter_lints: ^4.0.0

flutter:
plugin:
Expand Down
2 changes: 1 addition & 1 deletion packages/stripe_ios/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.3
flutter_lints: ^4.0.0

flutter:
plugin:
Expand Down
2 changes: 1 addition & 1 deletion packages/stripe_js/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/stripe_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions packages/stripe_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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:
sdk: flutter
build_runner: ^2.3.2
freezed: ^2.3.5
json_serializable: ^6.5.4
lints: ^2.0.1
lints: ^4.0.0

flutter:
plugin:
Expand Down

0 comments on commit 2a71799

Please sign in to comment.