adyen-flutter icon indicating copy to clipboard operation
adyen-flutter copied to clipboard

PaymentResult and its implementations should extends Equatable

Open Cteq3132 opened this issue 10 months ago • 1 comments

Describe the bug The class PaymentResult and all its implementation are not comparable. In Flutter, classes must extend Equatable to be able to compare object between them. Not doing so produces the following result:

final resultA = PaymentAdvancedFinished(resultCode = "Accepted");
final resultB = PaymentAdvancedFinished(resultCode = "Accepted");

print(resultA == resultB); // => false

To Reproduce See above.

Expected behavior Class comparison implementation.

Screenshots /

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

Cteq3132 avatar Apr 16 '24 14:04 Cteq3132