Skip to content

Conversation

yurii-prykhodko-solid
Copy link
Collaborator

No description provided.

@yurii-prykhodko-solid yurii-prykhodko-solid self-assigned this Aug 22, 2024
@yurii-prykhodko-solid yurii-prykhodko-solid marked this pull request as draft August 22, 2024 05:26
Comment on lines 6 to +10
class SubscriptionExpanded {
final Subscription subscription;
final List<Discount>? discounts;
final List<DiscountExpanded>? discounts;
final InvoiceExpanded? latestInvoice;
final Customer? customer;
final CustomerExpanded? customer;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the pattern we need to stick with. In most cases the included fields will have nesting of their own, and in order to minimize breaking changes as we add more "expanded" fields -- we'll need to make all nested fields xExpanded:

class ObjExpanded {
  final Obj obj;
  final NestedAExpanded nestedA;
  final NestedB...
}

Comment on lines +39 to +40
for (int i = 0; i < expand.innerNestedFields.length; i++)
'expand[$i]': expand.innerNestedFields.elementAt(i),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be extracted into a reusable piece. Maybe a utility on ExpandableField.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant