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.
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.