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

3,399

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
Share:
3,399
nypogi
Author by

nypogi

Mobile developer

Updated on December 06, 2022

Comments

  • nypogi
    nypogi over 1 year

    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.

    • Constantin N.
      Constantin N. over 5 years
      Do you have the same model for item 1, 2,3....?
  • nypogi
    nypogi over 5 years
    Thank you boformer! I'll try all of your suggestions. Thanks!
  • nypogi
    nypogi over 5 years
    Hi boformer! This is what I've been looking for. Just an additional, is there any way to change the "bullet" character in every level of the list because in all level it's just using the same "bullet" character? Thanks!
  • boformer
    boformer over 5 years
    I guess you went with markdown. Take a look at the source code of the library.
  • nypogi
    nypogi over 5 years
    Hello boformer. Yup. I used markdown. Okay. I'll take a look at the source code. Thank you very much!