I get the httpResponse with a decimal field as 1.0000, but when a!fromJson parses the response bode and returns 1. How can I process it? and pass a decimal value to api with the needed number of decimal places?
Discussion posts and replies are publicly visible
So: the api that you need to pass the value to - what type is the value expected to be passed as? If it's a decimal then passing 1 to it will be fine. If the type is text but it is only ever expecting a string that conforms to a decimal format then you can use the fixed() function to force 4 decimal places if needed.
It can be different number of decimal spaces 4, 6, 10. I should pass it to request as it receive from another response
type is decimal, but we need to pass exactly decimal with trailing zeros...