Passing multi-line text field content to api, not JSON safe

Widgets & Design

Hi - I'm using a multi-line TextField to display simple text, and allow the user to update it, but I found that when the user adds a new line in the TextField box, I get errors when passing that field content to an api call to update the record.

I believe the issue is that the field is no longer JSON safe, since new lines in the input aren't JSON safe.

Is there a setting for the TextField widget to ensure its contents are JSON-safe, or another widget I should be using for multi-line content saved as type String?

(Field in question is the Description field in the screenshot)

What have you tried so far?

Reviewed docs and searched on community

Did you check FlutterFlow's Documentation for this topic?
Yes
4
4 replies