0

"phrase": "educated washroom stinging breeze regroup earphone threaten epidemic hazy imbecile fritter bony"

So, phrase is my string. I want to get phrase string in form of string arraylist

stringList = ['educated','washroom','stinging',....]

1 Answer 1

1

you can do it by using split method of string like this

const string = 'Hello world!';
final splitted = string.split(' ');
print(splitted); // [Hello, world!];

you can read more details about split method from the official documentation.

Edit:

The solution for the problem you typed in the comment.

 ListView.builder(
          itemCount: stringList.length,
          itemBuilder: (context, index) {
            return ListTile(
              title: Text(stringList[index]),
            );
          },
        ),
Sign up to request clarification or add additional context in comments.

3 Comments

How can I display this string in list
12 words should display as separate item in listview
checkout the answer now i updated the answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.