Skip to content

Conversation

@uristrimber
Copy link

Fix: Revert card parsing logic in _handleCardChanged

This PR reverts the changes made to the input parsing logic in card_field.dart. The arguments map does not contain a nested 'card' key inside it.

Instead of incorrectly attempting to extract map['card'], this change reverts to passing the entire map directly to CardFieldInputDetails.fromJson.

@remonh87 remonh87 self-requested a review December 16, 2025 20:54
try {
final map = Map<String, dynamic>.from(arguments);
final update = CardFieldInputDetails.fromJson(
Map<String, dynamic>.from(map['card']),
Copy link
Member

Choose a reason for hiding this comment

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

I see this nesting is still necesarry tested it with latest sdk on android

Copy link
Author

Choose a reason for hiding this comment

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

the map doesn't have the 'card' value, it creates an exception and crashes.

Copy link
Author

Choose a reason for hiding this comment

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

Does the UI works for you?.
We had to fork the package in PROD as it was throwing an eception

Copy link
Member

Choose a reason for hiding this comment

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

I tested both android and ios and for the ui works. Can you give me some more details of the version of the package that you are using?

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.

2 participants