You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error should be something along the lines of: Instead of a static method CashBalance.fromJson, please use "factory CashBalance.fromJson".
Example
If I provide the fromJson but not the toJson, I get no errors. I should get something like Since you provided CashBalance.fromJson, you should also provide CashBalance.toJson, and vice-versa.
The text was updated successfully, but these errors were encountered:
If I make a mistake when creating custom toJson/fromJson, Celest shows me this unhelpful error message:
Example
This
fromJson
method has the wrong signature:The error should be something along the lines of:
Method CashBalance.fromJson should get a "Map<String, dynamic> value)" parameter.
Example
Here I used a static method, instead of a constructor:
The error should be something along the lines of:
Instead of a static method CashBalance.fromJson, please use "factory CashBalance.fromJson"
.Example
If I provide the
fromJson
but not thetoJson
, I get no errors. I should get something likeSince you provided CashBalance.fromJson, you should also provide CashBalance.toJson
, and vice-versa.The text was updated successfully, but these errors were encountered: