fluttercandies / JsonToDart

The tool to convert json to dart code, support Windows,Mac,Web.
MIT License
355 stars 42 forks source link

能否支持Decimal类型 #6

Closed 350887156 closed 3 years ago

350887156 commented 3 years ago

针对整型或浮点型,能否支持Decimal类型设置

zmtzawqlp commented 3 years ago

T asT( dynamic value, { T defaultValue, }) { if (value is T) { return value; } return defaultValue; }

我觉得这个方法你可以自己重写,int 和double 都是double 不就好了