adaptyteam / AdaptySDK-Flutter

SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
96 stars 17 forks source link

Declare AdaptyErrorCode static variables as constant #110

Open jezsung opened 3 months ago

jezsung commented 3 months ago

The AdaptyErrorCode variables are currently declared as static final.

This makes it impossible to use the error codes with the switch expression.

I suggest the following code changes to all static variables:

class AdaptyErrorCode {
  static final int unknown = 0;
  // to
  static const int unknown = 0;
...
x401om commented 2 months ago

Hi @jezsung! That seems to be a good enhancement. I think we will implement that in the next release. Thank you!