Skip to content

Commit

Permalink
Fix data model shipping details (#519)
Browse files Browse the repository at this point in the history
* update freezed buildrunner and json annotation

* make shipping details properties nullable like the native Stripe sdks

* fix web data model
  • Loading branch information
remonh87 committed Jan 6, 2022
1 parent d91eda2 commit 71b65a6
Show file tree
Hide file tree
Showing 18 changed files with 778 additions and 621 deletions.
@@ -1,5 +1,6 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target

part of 'address.dart';
Expand Down Expand Up @@ -241,18 +242,24 @@ class _$_Address implements _Address {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _Address &&
(identical(other.city, city) || other.city == city) &&
(identical(other.country, country) || other.country == country) &&
(identical(other.line1, line1) || other.line1 == line1) &&
(identical(other.line2, line2) || other.line2 == line2) &&
(identical(other.postalCode, postalCode) ||
other.postalCode == postalCode) &&
(identical(other.state, state) || other.state == state));
const DeepCollectionEquality().equals(other.city, city) &&
const DeepCollectionEquality().equals(other.country, country) &&
const DeepCollectionEquality().equals(other.line1, line1) &&
const DeepCollectionEquality().equals(other.line2, line2) &&
const DeepCollectionEquality()
.equals(other.postalCode, postalCode) &&
const DeepCollectionEquality().equals(other.state, state));
}

@override
int get hashCode =>
Object.hash(runtimeType, city, country, line1, line2, postalCode, state);
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(city),
const DeepCollectionEquality().hash(country),
const DeepCollectionEquality().hash(line1),
const DeepCollectionEquality().hash(line2),
const DeepCollectionEquality().hash(postalCode),
const DeepCollectionEquality().hash(state));

@JsonKey(ignore: true)
@override
Expand Down
@@ -1,5 +1,6 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target

part of 'app_info.dart';
Expand Down Expand Up @@ -167,15 +168,19 @@ class _$_AppInfo implements _AppInfo {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _AppInfo &&
(identical(other.name, name) || other.name == name) &&
(identical(other.partnerId, partnerId) ||
other.partnerId == partnerId) &&
(identical(other.url, url) || other.url == url) &&
(identical(other.version, version) || other.version == version));
const DeepCollectionEquality().equals(other.name, name) &&
const DeepCollectionEquality().equals(other.partnerId, partnerId) &&
const DeepCollectionEquality().equals(other.url, url) &&
const DeepCollectionEquality().equals(other.version, version));
}

@override
int get hashCode => Object.hash(runtimeType, name, partnerId, url, version);
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(name),
const DeepCollectionEquality().hash(partnerId),
const DeepCollectionEquality().hash(url),
const DeepCollectionEquality().hash(version));

@JsonKey(ignore: true)
@override
Expand Down
@@ -1,5 +1,6 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target

part of 'apple_pay.dart';
Expand Down Expand Up @@ -208,17 +209,22 @@ class _$_ApplePayShippingMethod implements _ApplePayShippingMethod {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _ApplePayShippingMethod &&
(identical(other.label, label) || other.label == label) &&
(identical(other.amount, amount) || other.amount == amount) &&
(identical(other.identifier, identifier) ||
other.identifier == identifier) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.detail, detail) || other.detail == detail));
const DeepCollectionEquality().equals(other.label, label) &&
const DeepCollectionEquality().equals(other.amount, amount) &&
const DeepCollectionEquality()
.equals(other.identifier, identifier) &&
const DeepCollectionEquality().equals(other.type, type) &&
const DeepCollectionEquality().equals(other.detail, detail));
}

@override
int get hashCode =>
Object.hash(runtimeType, label, amount, identifier, type, detail);
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(label),
const DeepCollectionEquality().hash(amount),
const DeepCollectionEquality().hash(identifier),
const DeepCollectionEquality().hash(type),
const DeepCollectionEquality().hash(detail));

@JsonKey(ignore: true)
@override
Expand Down Expand Up @@ -400,12 +406,15 @@ class _$_ApplePayCartSummaryItem implements _ApplePayCartSummaryItem {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _ApplePayCartSummaryItem &&
(identical(other.label, label) || other.label == label) &&
(identical(other.amount, amount) || other.amount == amount));
const DeepCollectionEquality().equals(other.label, label) &&
const DeepCollectionEquality().equals(other.amount, amount));
}

@override
int get hashCode => Object.hash(runtimeType, label, amount);
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(label),
const DeepCollectionEquality().hash(amount));

@JsonKey(ignore: true)
@override
Expand Down Expand Up @@ -686,9 +695,8 @@ class _$_ApplePayPresentParams implements _ApplePayPresentParams {
(other.runtimeType == runtimeType &&
other is _ApplePayPresentParams &&
const DeepCollectionEquality().equals(other.cartItems, cartItems) &&
(identical(other.country, country) || other.country == country) &&
(identical(other.currency, currency) ||
other.currency == currency) &&
const DeepCollectionEquality().equals(other.country, country) &&
const DeepCollectionEquality().equals(other.currency, currency) &&
const DeepCollectionEquality().equals(
other.requiredShippingAddressFields,
requiredShippingAddressFields) &&
Expand All @@ -703,8 +711,8 @@ class _$_ApplePayPresentParams implements _ApplePayPresentParams {
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(cartItems),
country,
currency,
const DeepCollectionEquality().hash(country),
const DeepCollectionEquality().hash(currency),
const DeepCollectionEquality().hash(requiredShippingAddressFields),
const DeepCollectionEquality().hash(requiredBillingContactFields),
const DeepCollectionEquality().hash(shippingMethods));
Expand Down
@@ -1,5 +1,6 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target

part of 'aubecs_form.dart';
Expand Down Expand Up @@ -68,13 +69,15 @@ mixin _$AubecsFormStyle {
int? get fontSize => throw _privateConstructorUsedError;

/// Borderwith of the form
/// Only available for Android
int? get borderWidth => throw _privateConstructorUsedError;
@JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)
Color? get backgroundColor => throw _privateConstructorUsedError;
@JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)
Color? get borderColor => throw _privateConstructorUsedError;

/// Borderadius of the form
/// Only available for Android
int? get borderRadius => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Expand Down Expand Up @@ -281,6 +284,7 @@ class _$_AubecsFormStyle implements _AubecsFormStyle {
@override

/// Borderwith of the form
/// Only available for Android
final int? borderWidth;
@override
@JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)
Expand All @@ -291,6 +295,7 @@ class _$_AubecsFormStyle implements _AubecsFormStyle {
@override

/// Borderadius of the form
/// Only available for Android
final int? borderRadius;

@override
Expand All @@ -303,35 +308,33 @@ class _$_AubecsFormStyle implements _AubecsFormStyle {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _AubecsFormStyle &&
(identical(other.textColor, textColor) ||
other.textColor == textColor) &&
(identical(other.textErrorColor, textErrorColor) ||
other.textErrorColor == textErrorColor) &&
(identical(other.placeholderColor, placeholderColor) ||
other.placeholderColor == placeholderColor) &&
(identical(other.fontSize, fontSize) ||
other.fontSize == fontSize) &&
(identical(other.borderWidth, borderWidth) ||
other.borderWidth == borderWidth) &&
(identical(other.backgroundColor, backgroundColor) ||
other.backgroundColor == backgroundColor) &&
(identical(other.borderColor, borderColor) ||
other.borderColor == borderColor) &&
(identical(other.borderRadius, borderRadius) ||
other.borderRadius == borderRadius));
const DeepCollectionEquality().equals(other.textColor, textColor) &&
const DeepCollectionEquality()
.equals(other.textErrorColor, textErrorColor) &&
const DeepCollectionEquality()
.equals(other.placeholderColor, placeholderColor) &&
const DeepCollectionEquality().equals(other.fontSize, fontSize) &&
const DeepCollectionEquality()
.equals(other.borderWidth, borderWidth) &&
const DeepCollectionEquality()
.equals(other.backgroundColor, backgroundColor) &&
const DeepCollectionEquality()
.equals(other.borderColor, borderColor) &&
const DeepCollectionEquality()
.equals(other.borderRadius, borderRadius));
}

@override
int get hashCode => Object.hash(
runtimeType,
textColor,
textErrorColor,
placeholderColor,
fontSize,
borderWidth,
backgroundColor,
borderColor,
borderRadius);
const DeepCollectionEquality().hash(textColor),
const DeepCollectionEquality().hash(textErrorColor),
const DeepCollectionEquality().hash(placeholderColor),
const DeepCollectionEquality().hash(fontSize),
const DeepCollectionEquality().hash(borderWidth),
const DeepCollectionEquality().hash(backgroundColor),
const DeepCollectionEquality().hash(borderColor),
const DeepCollectionEquality().hash(borderRadius));

@JsonKey(ignore: true)
@override
Expand Down Expand Up @@ -379,6 +382,7 @@ abstract class _AubecsFormStyle implements AubecsFormStyle {
@override

/// Borderwith of the form
/// Only available for Android
int? get borderWidth;
@override
@JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)
Expand All @@ -389,6 +393,7 @@ abstract class _AubecsFormStyle implements AubecsFormStyle {
@override

/// Borderadius of the form
/// Only available for Android
int? get borderRadius;
@override
@JsonKey(ignore: true)
Expand Down Expand Up @@ -576,17 +581,20 @@ class _$_AubecsFormInputDetails implements _AubecsFormInputDetails {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _AubecsFormInputDetails &&
(identical(other.bsbNumber, bsbNumber) ||
other.bsbNumber == bsbNumber) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.accountNumber, accountNumber) ||
other.accountNumber == accountNumber) &&
(identical(other.email, email) || other.email == email));
const DeepCollectionEquality().equals(other.bsbNumber, bsbNumber) &&
const DeepCollectionEquality().equals(other.name, name) &&
const DeepCollectionEquality()
.equals(other.accountNumber, accountNumber) &&
const DeepCollectionEquality().equals(other.email, email));
}

@override
int get hashCode =>
Object.hash(runtimeType, bsbNumber, name, accountNumber, email);
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(bsbNumber),
const DeepCollectionEquality().hash(name),
const DeepCollectionEquality().hash(accountNumber),
const DeepCollectionEquality().hash(email));

@JsonKey(ignore: true)
@override
Expand Down
@@ -1,5 +1,6 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target

part of 'card_details.dart';
Expand Down Expand Up @@ -180,17 +181,21 @@ class _$_CardDetailsConstructor extends _CardDetailsConstructor {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _CardDetailsConstructor &&
(identical(other.number, number) || other.number == number) &&
(identical(other.expirationYear, expirationYear) ||
other.expirationYear == expirationYear) &&
(identical(other.expirationMonth, expirationMonth) ||
other.expirationMonth == expirationMonth) &&
(identical(other.cvc, cvc) || other.cvc == cvc));
const DeepCollectionEquality().equals(other.number, number) &&
const DeepCollectionEquality()
.equals(other.expirationYear, expirationYear) &&
const DeepCollectionEquality()
.equals(other.expirationMonth, expirationMonth) &&
const DeepCollectionEquality().equals(other.cvc, cvc));
}

@override
int get hashCode =>
Object.hash(runtimeType, number, expirationYear, expirationMonth, cvc);
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(number),
const DeepCollectionEquality().hash(expirationYear),
const DeepCollectionEquality().hash(expirationMonth),
const DeepCollectionEquality().hash(cvc));

@JsonKey(ignore: true)
@override
Expand Down

0 comments on commit 71b65a6

Please sign in to comment.