Failed to Post from Flutter to REST API

I am trying to create entity into a table from my Flutter app under development where I am using CUBA-PLATFORM REST API add-on. I am getting the following error in the log when I try to POST.

022-03-07 11:43:45.642 DEBUG [http-nio-8080-exec-3/myapp/hadji] com.haulmont.addon.restapi.api.auth.CubaRestLastSecurityFilter - REST API request [***KSqg] POST http://myIPAddres:8080/myapp/rest/v2/entities/erp_OutstationDuty 50.50.50.2
2022-03-07 11:43:45.642 DEBUG [http-nio-8080-exec-3/myapp/hadji] com.haulmont.addon.restapi.api.rest.RestAPIDispatcherServlet - POST "/myapp/rest/v2/entities/erp_OutstationDuty", parameters={masked}
2022-03-07 11:43:45.642 ERROR [http-nio-8080-exec-3/myapp/hadji] com.haulmont.addon.restapi.api.controllers.RestControllerExceptionHandler - Exception in REST controller
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 9 path $
	at com.google.gson.JsonParser.parseReader(JsonParser.java:66) ~[gson-2.8.6.jar:na]
	at com.google.gson.JsonParser.parseString(JsonParser.java:47) ~[gson-2.8.6.jar:na]
	at com.google.gson.JsonParser.parse(JsonParser.java:98) ~[gson-2.8.6.jar:na]
	at com.haulmont.addon.restapi.api.service.EntitiesControllerManager.createEntity(EntitiesControllerManager.java:399) ~[restapi-rest-api-7.2.4.jar:na]
	at com.haulmont.addon.restapi.api.controllers.EntitiesController.createEntity(EntitiesController.java:126) ~[restapi-rest-api-7.2.4.jar:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) ~[servlet-api.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[servlet-api.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[catalina.jar:9.0.44]
	at o

As I am new to REST API and Flutter, not sure if this issue is related to CUBA REST API add-on or Flutter. I used very similar code from the http package of Flutter and CUBA_PLATFORM REST API Addon guides as follows:

 final String pathUrl = 'http://myIPAddress:8080/myapp/rest/v2/entities/erp_OutstationDuty'
     var url = Uri.parse(pathUrl);
        var response = await http.post(url, body: {'appDate': app_date.text, 'dateFrom': startDate.toString(), 'dateTo': endDate.toString(), 'totalDays': cont_app_days.text.toString(), 'location': cont_location.text.toString(), 'purpose': cont_purpose.text.toString()},
            headers: {
                'Accept': 'application/json',
                'Authorization': 'Bearer $token',
                }
            );

Thanks for any help.