Skip to content

Commit

Permalink
Use a clearer variable name for the stream collection config
Browse files Browse the repository at this point in the history
  • Loading branch information
JlUgia committed Oct 10, 2024
1 parent 91fa0bb commit 8c54031
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pay/lib/src/widgets/apple_pay_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ class ApplePayButton extends PayButton {
late final Widget _payButton = _applePayButton;

@override
final bool _returnsPaymentDataSynchronously = true;
final bool _collectPaymentResultSynchronously = true;
}
2 changes: 1 addition & 1 deletion pay/lib/src/widgets/google_pay_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class GooglePayButton extends PayButton {
late final Widget _payButton = _googlePayButton;

@override
final bool _returnsPaymentDataSynchronously = false;
final bool _collectPaymentResultSynchronously = false;

@override
State<PayButton> createState() => _GooglePayButtonState();
Expand Down
4 changes: 2 additions & 2 deletions pay/lib/src/widgets/pay_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ abstract class PayButton extends StatefulWidget {
/// This field is defined by implementations of this class to determine if the
/// payment result is returned right after calling [Pay.showPaymentSelector]
/// or rather received through asynchronous means (e.g.: an event stream).
bool get _returnsPaymentDataSynchronously;
bool get _collectPaymentResultSynchronously;

/// Determines whether the current platform is supported by the button.
bool get _isPlatformSupported =>
Expand All @@ -100,7 +100,7 @@ abstract class PayButton extends StatefulWidget {
try {
final result =
await _payClient.showPaymentSelector(buttonProvider, paymentItems);
if (_returnsPaymentDataSynchronously) _deliverPaymentResult(result);
if (_collectPaymentResultSynchronously) _deliverPaymentResult(result);
} catch (error) {
_deliverError(error);
}
Expand Down

0 comments on commit 8c54031

Please sign in to comment.