Skip to content

Commit

Permalink
fix: sync with stripe 0.35 sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Remon committed Nov 20, 2023
1 parent 57825e2 commit 277b786
Show file tree
Hide file tree
Showing 48 changed files with 4,852 additions and 4,129 deletions.
7 changes: 6 additions & 1 deletion packages/stripe/lib/src/widgets/google_pay_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class GooglePayButton extends StatefulWidget {
required this.onTap,
this.type = GooglePayButtonType.pay,
this.buttonType = PlatformButtonType.pay,
this.borderRadius,
this.appearance = PlatformButtonStyle.automatic,
Key? key,
}) : super(key: key);

Expand All @@ -22,6 +24,8 @@ class GooglePayButton extends StatefulWidget {
@Deprecated('Use [buttonType] instead')
final GooglePayButtonType type;

final double? borderRadius;
final PlatformButtonStyle appearance;
final PlatformButtonType buttonType;
final VoidCallback onTap;
}
Expand All @@ -35,7 +39,8 @@ class _GooglePayButtonState extends State<GooglePayButton> {
// ignore: deprecated_member_use_from_same_package
_creationParams['buttonType'] = describeEnum(widget.type);
_creationParams['type'] = widget.buttonType.id;

_creationParams['appearance'] = widget.appearance.id;
_creationParams['borderRadius'] = widget.borderRadius;
super.initState();
}

Expand Down
5 changes: 3 additions & 2 deletions packages/stripe/lib/src/widgets/platform_pay_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class PlatformPayButton extends StatelessWidget {
/// Defines the displayed text on the button.
final PlatformButtonType type;

/// iOS only, defines the color and border radius of the button
/// Defines the coloring of the button
final PlatformButtonStyle appearance;

/// iOS only, sets the border radius of the corners.
/// Sets the border radius of the corners.
final double borderRadius;

/// ios only, execute a callback when shipping
Expand Down Expand Up @@ -72,6 +72,7 @@ class PlatformPayButton extends StatelessWidget {
return GooglePayButton(
onTap: onPressed,
buttonType: type,
borderRadius: borderRadius,
);
} else if (Platform.isIOS) {
return ApplePayButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ class _$CollectBankAccountParamsCopyWithImpl<$Res,
}

/// @nodoc
abstract class _$$_CollectBankAccountParamsCopyWith<$Res>
abstract class _$$CollectBankAccountParamsImplCopyWith<$Res>
implements $CollectBankAccountParamsCopyWith<$Res> {
factory _$$_CollectBankAccountParamsCopyWith(
_$_CollectBankAccountParams value,
$Res Function(_$_CollectBankAccountParams) then) =
__$$_CollectBankAccountParamsCopyWithImpl<$Res>;
factory _$$CollectBankAccountParamsImplCopyWith(
_$CollectBankAccountParamsImpl value,
$Res Function(_$CollectBankAccountParamsImpl) then) =
__$$CollectBankAccountParamsImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
Expand All @@ -103,12 +103,13 @@ abstract class _$$_CollectBankAccountParamsCopyWith<$Res>
}

/// @nodoc
class __$$_CollectBankAccountParamsCopyWithImpl<$Res>
class __$$CollectBankAccountParamsImplCopyWithImpl<$Res>
extends _$CollectBankAccountParamsCopyWithImpl<$Res,
_$_CollectBankAccountParams>
implements _$$_CollectBankAccountParamsCopyWith<$Res> {
__$$_CollectBankAccountParamsCopyWithImpl(_$_CollectBankAccountParams _value,
$Res Function(_$_CollectBankAccountParams) _then)
_$CollectBankAccountParamsImpl>
implements _$$CollectBankAccountParamsImplCopyWith<$Res> {
__$$CollectBankAccountParamsImplCopyWithImpl(
_$CollectBankAccountParamsImpl _value,
$Res Function(_$CollectBankAccountParamsImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -117,7 +118,7 @@ class __$$_CollectBankAccountParamsCopyWithImpl<$Res>
Object? billingDetails = null,
Object? paymentMethodType = null,
}) {
return _then(_$_CollectBankAccountParams(
return _then(_$CollectBankAccountParamsImpl(
billingDetails: null == billingDetails
? _value.billingDetails
: billingDetails // ignore: cast_nullable_to_non_nullable
Expand All @@ -133,13 +134,13 @@ class __$$_CollectBankAccountParamsCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable(explicitToJson: true)
class _$_CollectBankAccountParams implements _CollectBankAccountParams {
const _$_CollectBankAccountParams(
class _$CollectBankAccountParamsImpl implements _CollectBankAccountParams {
const _$CollectBankAccountParamsImpl(
{required this.billingDetails,
this.paymentMethodType = PaymentMethodType.USBankAccount});

factory _$_CollectBankAccountParams.fromJson(Map<String, dynamic> json) =>
_$$_CollectBankAccountParamsFromJson(json);
factory _$CollectBankAccountParamsImpl.fromJson(Map<String, dynamic> json) =>
_$$CollectBankAccountParamsImplFromJson(json);

/// Billingdetails of the account holder
///
Expand All @@ -162,7 +163,7 @@ class _$_CollectBankAccountParams implements _CollectBankAccountParams {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_CollectBankAccountParams &&
other is _$CollectBankAccountParamsImpl &&
(identical(other.billingDetails, billingDetails) ||
other.billingDetails == billingDetails) &&
(identical(other.paymentMethodType, paymentMethodType) ||
Expand All @@ -177,25 +178,26 @@ class _$_CollectBankAccountParams implements _CollectBankAccountParams {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_CollectBankAccountParamsCopyWith<_$_CollectBankAccountParams>
get copyWith => __$$_CollectBankAccountParamsCopyWithImpl<
_$_CollectBankAccountParams>(this, _$identity);
_$$CollectBankAccountParamsImplCopyWith<_$CollectBankAccountParamsImpl>
get copyWith => __$$CollectBankAccountParamsImplCopyWithImpl<
_$CollectBankAccountParamsImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_CollectBankAccountParamsToJson(
return _$$CollectBankAccountParamsImplToJson(
this,
);
}
}

abstract class _CollectBankAccountParams implements CollectBankAccountParams {
const factory _CollectBankAccountParams(
{required final BillingDetails billingDetails,
final PaymentMethodType paymentMethodType}) = _$_CollectBankAccountParams;
{required final BillingDetails billingDetails,
final PaymentMethodType paymentMethodType}) =
_$CollectBankAccountParamsImpl;

factory _CollectBankAccountParams.fromJson(Map<String, dynamic> json) =
_$_CollectBankAccountParams.fromJson;
_$CollectBankAccountParamsImpl.fromJson;

@override

Expand All @@ -210,7 +212,7 @@ abstract class _CollectBankAccountParams implements CollectBankAccountParams {
PaymentMethodType get paymentMethodType;
@override
@JsonKey(ignore: true)
_$$_CollectBankAccountParamsCopyWith<_$_CollectBankAccountParams>
_$$CollectBankAccountParamsImplCopyWith<_$CollectBankAccountParamsImpl>
get copyWith => throw _privateConstructorUsedError;
}

Expand Down Expand Up @@ -278,25 +280,25 @@ class _$VerifyMicroDepositsParamsCopyWithImpl<$Res,
}

/// @nodoc
abstract class _$$_VerifyMicroDepositsParamsCopyWith<$Res>
abstract class _$$VerifyMicroDepositsParamsImplCopyWith<$Res>
implements $VerifyMicroDepositsParamsCopyWith<$Res> {
factory _$$_VerifyMicroDepositsParamsCopyWith(
_$_VerifyMicroDepositsParams value,
$Res Function(_$_VerifyMicroDepositsParams) then) =
__$$_VerifyMicroDepositsParamsCopyWithImpl<$Res>;
factory _$$VerifyMicroDepositsParamsImplCopyWith(
_$VerifyMicroDepositsParamsImpl value,
$Res Function(_$VerifyMicroDepositsParamsImpl) then) =
__$$VerifyMicroDepositsParamsImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({List<int>? amounts, String? descriptorCode});
}

/// @nodoc
class __$$_VerifyMicroDepositsParamsCopyWithImpl<$Res>
class __$$VerifyMicroDepositsParamsImplCopyWithImpl<$Res>
extends _$VerifyMicroDepositsParamsCopyWithImpl<$Res,
_$_VerifyMicroDepositsParams>
implements _$$_VerifyMicroDepositsParamsCopyWith<$Res> {
__$$_VerifyMicroDepositsParamsCopyWithImpl(
_$_VerifyMicroDepositsParams _value,
$Res Function(_$_VerifyMicroDepositsParams) _then)
_$VerifyMicroDepositsParamsImpl>
implements _$$VerifyMicroDepositsParamsImplCopyWith<$Res> {
__$$VerifyMicroDepositsParamsImplCopyWithImpl(
_$VerifyMicroDepositsParamsImpl _value,
$Res Function(_$VerifyMicroDepositsParamsImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -305,7 +307,7 @@ class __$$_VerifyMicroDepositsParamsCopyWithImpl<$Res>
Object? amounts = freezed,
Object? descriptorCode = freezed,
}) {
return _then(_$_VerifyMicroDepositsParams(
return _then(_$VerifyMicroDepositsParamsImpl(
amounts: freezed == amounts
? _value._amounts
: amounts // ignore: cast_nullable_to_non_nullable
Expand All @@ -321,13 +323,13 @@ class __$$_VerifyMicroDepositsParamsCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable(explicitToJson: true)
class _$_VerifyMicroDepositsParams implements _VerifyMicroDepositsParams {
const _$_VerifyMicroDepositsParams(
class _$VerifyMicroDepositsParamsImpl implements _VerifyMicroDepositsParams {
const _$VerifyMicroDepositsParamsImpl(
{final List<int>? amounts, this.descriptorCode})
: _amounts = amounts;

factory _$_VerifyMicroDepositsParams.fromJson(Map<String, dynamic> json) =>
_$$_VerifyMicroDepositsParamsFromJson(json);
factory _$VerifyMicroDepositsParamsImpl.fromJson(Map<String, dynamic> json) =>
_$$VerifyMicroDepositsParamsImplFromJson(json);

/// The amounts of the microdeposits that are deposited on the account.
///
Expand Down Expand Up @@ -363,7 +365,7 @@ class _$_VerifyMicroDepositsParams implements _VerifyMicroDepositsParams {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_VerifyMicroDepositsParams &&
other is _$VerifyMicroDepositsParamsImpl &&
const DeepCollectionEquality().equals(other._amounts, _amounts) &&
(identical(other.descriptorCode, descriptorCode) ||
other.descriptorCode == descriptorCode));
Expand All @@ -377,13 +379,13 @@ class _$_VerifyMicroDepositsParams implements _VerifyMicroDepositsParams {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_VerifyMicroDepositsParamsCopyWith<_$_VerifyMicroDepositsParams>
get copyWith => __$$_VerifyMicroDepositsParamsCopyWithImpl<
_$_VerifyMicroDepositsParams>(this, _$identity);
_$$VerifyMicroDepositsParamsImplCopyWith<_$VerifyMicroDepositsParamsImpl>
get copyWith => __$$VerifyMicroDepositsParamsImplCopyWithImpl<
_$VerifyMicroDepositsParamsImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_VerifyMicroDepositsParamsToJson(
return _$$VerifyMicroDepositsParamsImplToJson(
this,
);
}
Expand All @@ -392,10 +394,10 @@ class _$_VerifyMicroDepositsParams implements _VerifyMicroDepositsParams {
abstract class _VerifyMicroDepositsParams implements VerifyMicroDepositsParams {
const factory _VerifyMicroDepositsParams(
{final List<int>? amounts,
final String? descriptorCode}) = _$_VerifyMicroDepositsParams;
final String? descriptorCode}) = _$VerifyMicroDepositsParamsImpl;

factory _VerifyMicroDepositsParams.fromJson(Map<String, dynamic> json) =
_$_VerifyMicroDepositsParams.fromJson;
_$VerifyMicroDepositsParamsImpl.fromJson;

@override

Expand All @@ -412,6 +414,6 @@ abstract class _VerifyMicroDepositsParams implements VerifyMicroDepositsParams {
String? get descriptorCode;
@override
@JsonKey(ignore: true)
_$$_VerifyMicroDepositsParamsCopyWith<_$_VerifyMicroDepositsParams>
_$$VerifyMicroDepositsParamsImplCopyWith<_$VerifyMicroDepositsParamsImpl>
get copyWith => throw _privateConstructorUsedError;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 277b786

Please sign in to comment.