I've a small doubt on displaying data through AWS Amplify DataStore.

I've the below model in schema.graphql

type ItemFaq @model @auth(rules: [{allow: public}]) {
  id: ID!
  indexItemFaq: Int
  titleItemFaq: String
  subtitleItemFaq: String
} 

I've deployed data model in AWS Amplify and updated sample data with new line character - as shown below: enter image description here

In my Flutter App, I wanted to show data in newline using Flutter 'Text' class, but instead I'm getting the data retrieved from AWS Amplify as shown below: enter image description here

How can I make use of Flutter 'Text' class to show data in new line when retrieving data from AWS Amplify?

1

There are 1 best solutions below

1
Texv On BEST ANSWER

Try this:

Text(
'subtitle'.replaceAll('\\n', '\n'),
),