Skip to content

Commit

Permalink
Cast number from decoded json to double before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMarner committed Oct 28, 2019
1 parent 31e7ea9 commit b3cadf9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ class {{classname}} {
(json['{{baseName}}'] as List).map((item) => item as {{items.datatype}}).toList()
{{/isListContainer}}
{{^isListContainer}}
{{#isDouble}}
json['{{baseName}}'].toDouble()
{{/isDouble}}
{{^isDouble}}
json['{{baseName}}']
{{/isDouble}}
{{/isListContainer}}
{{/complexType}};
{{/isDateTime}}
Expand Down

0 comments on commit b3cadf9

Please sign in to comment.