google-pay / flutter-plugin

Apache License 2.0
145 stars 129 forks source link

[iOS] Crash if label of PaymentItem is not provided #265

Open omartinma opened 6 months ago

omartinma commented 6 months ago

Hi,

According to the model definition of PaymentItem the property label is not required. If we dont pass a value it will crash in iOS as soon as you call showPaymentSelector. I did not test it on Android yet, not sure if the same case there but I believe we have 2 options:

  1. Make the field not nullable.
  2. Add documentation about the need to pass a value on iOS

Thanks!

JlUgia commented 4 months ago

Hi @omartinma, thank you for reporting the issue. I'm leaning towards making it required. Only documenting it will still yield crashes for some.