Ny Regency
Ny Regency

Reputation: 1722

Flutter: Is there a way to display multi bulleted list?

How do you display a list like this in flutter?

enter image description here

Like for numbers no indentions, for "*" 1 indention, "o" 2 indentions and so on.

Upvotes: 3

Views: 4995

Answers (1)

boformer
boformer

Reputation: 30103

There is no such mechanic built into Flutter. I'm not sure how many lists you want to display, how long the lists can be and where the data is coming from.

flutter_markdown is a good solution if you also need paragraphs and other text styles. Just supply your list in markdown format to the widget.

You can also build an indented list with Flutter core widgets:

  • Use a Column or ListView for the list of items
  • Use Rows to position the widgets of a single list item
  • Use a Text or Icon widget to display bullets or numbers
  • Use a Text widget to display the item text (wrapped by Expanded widget)
  • Use SizedBox(width: ...) to add margins, paddings and indentation

Upvotes: 5

Related Questions