[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a guide that lists circumstances to use a given widget #2959

Open
kf6gpe opened this issue Sep 4, 2019 · 6 comments
Open

Add a guide that lists circumstances to use a given widget #2959

kf6gpe opened this issue Sep 4, 2019 · 6 comments
Labels
a.cookbook Relates to a cookbook recipe or guide a.faq Relates to the FAQ section of Flutter.dev co.volunteer Community wants to work on this d.enhancement Improves docs with specific ask e3-weeks Effort: < 4 weeks fix.code-sample Needs new or updated code sample p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. t.widgets Relates to the Widget catalog

Comments

@kf6gpe
Copy link
Contributor
kf6gpe commented Sep 4, 2019

We see a lot of people on the flutter/flutter/issues asking questions about which list widget to use for different purposes (e.g., different sized items, for best performance, etc). It would be good to have a one-page tutorial with a table with some ranking criteria across the top and the various choices for lists in rows, with color shading for good/bad results.

cc @dnfield for the idea.

@kf6gpe kf6gpe added d.enhancement Improves docs with specific ask a.get-started Relates to the Getting Started section of docs.flutter.dev a.faq Relates to the FAQ section of Flutter.dev a.cookbook Relates to a cookbook recipe or guide e1-hours Effort: < 8 hrs labels Sep 4, 2019
@dnfield
Copy link
Contributor
dnfield commented Sep 4, 2019

Something that covered when to use which of the following:

  • Column
  • SingleChildScrollView
  • CustomScrollView
  • ListView.builder
  • ListView
  • CustomScrollView
  • SliverList
  • Probably some other I'm missing

/cc @goderbauer and @Piinks who probably have some good ideas.

@arps18
Copy link
arps18 commented May 14, 2020

@kf6gpe @dnfield I would like to work on it!

@0xapurv
Copy link
Contributor
0xapurv commented Aug 15, 2020

Hello! I want to start my contribution to this repo. Can I take up this issue?

@atsansone atsansone removed the a.get-started Relates to the Getting Started section of docs.flutter.dev label May 17, 2023
@atsansone atsansone added co.volunteer Community wants to work on this p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. e3-weeks Effort: < 4 weeks ltw-triage and removed e1-hours Effort: < 8 hrs labels Jun 5, 2023
@atsansone atsansone changed the title Provide a page/tutorial with a table of which list widget to use when Add a guide that lists circumstances to use a given widget Jun 5, 2023
@atsansone
Copy link
Contributor

@0xapurv or @arps18 : Please give this a try. Let us know if you have issues.

@atsansone atsansone added the t.widgets Relates to the Widget catalog label Jun 6, 2023
@sfshaza2
Copy link
Contributor

@miquelbeltran, do you have specific advice for this one?

@sfshaza2 sfshaza2 added the fix.code-sample Needs new or updated code sample label Jul 13, 2023
@miquelbeltran
Copy link
Member
miquelbeltran commented Aug 3, 2023

We can find these widgets either as "scrollables" (https://docs.flutter.dev/ui/widgets/scrolling) or as "multi-child" layout widgets (https://docs.flutter.dev/ui/widgets/layout) in the documentation.

These two pages already provide a short description of what the widget purpose is, but then you need to go deeper into the documentation to find out which is the recommended use in terms of performance:
For example the ListView docs explain the differences between passing a list as children, or using the builder and custom factory constructors, and it notes that builder is more efficient. https://api.flutter.dev/flutter/widgets/ListView-class.html

I think it would be good to extract part of that information from the widget docs into an "Overview" page under Layouts > Lists & grids on the side menu of the website that guides the developer into which type of list choose depending on the task.

I'd not go into detail of performance, but rather the usecase: e.g. if you have few items that will be visible most of the time, use ListView(), and then link the user to the existing cookbook. If you have a large number of items that are all similar, use ListView.builder(), etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.cookbook Relates to a cookbook recipe or guide a.faq Relates to the FAQ section of Flutter.dev co.volunteer Community wants to work on this d.enhancement Improves docs with specific ask e3-weeks Effort: < 4 weeks fix.code-sample Needs new or updated code sample p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. t.widgets Relates to the Widget catalog
Projects
None yet
Development

No branches or pull requests

8 participants