Flutter Tutorial - SingleChildScrollView [2022]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
how to make a single widget scrollable in flutter inside a column or row widget make sure to remove all the flexible widgets and expanded widgets if you get now an overflow because the column has not enough space to display all the items then simply wrap a single child scroll view around the column with this all widgets in the column are scrollable next to make a row scrollable you need to wrap the single child scroll view around and also set the scroll direction to horizontal with this all the row widgets are scrollable horizontally the main advantage is that the column is not scrollable if all the widgets fit on the screen however if our screen dimension changes then also our column is scrollable so that all items can be displayed and finally the expanded flexible and main axis alignment space work properly inside a column however if you wrap a single chart scroll view around then the main axis alignment space will be ignored or if you use an expanded or flexible widget then you get a layout error and nothing is displayed on the screen simply wrap a layout builder around the single child scroll view and around the column you wrap then the constraint box with the constraints that you get from the layout builder and also an intrinsic height widget as a result you can use the main axis alignment space inside a scrollable column once the space is not available then the column is scrollable also the expanded and flexible widgets work properly inside the scrollable column once we reach the fixed height of the widgets then our column is scrollable finally the scrollable column renders all widgets on the screen if you have a lot of items use a list view builder instead so that only the widgets that are currently displayed on the screen are rendered [Music] you
Info
Channel: HeyFlutter․com
Views: 28,694
Rating: undefined out of 5
Keywords: flutter, flutter expanded, flutter flexible, flutter mainaxisalignment, flutter singlechildscrollview, flutter singlechildscrollview expanded, flutter singlechildscrollview horizontal, flutter singlechildscrollview not scrolling, flutter tutorial, flutter tutorial for beginners, flutter widgets, listview vs singlechildscrollview, singlechildscrollview, singlechildscrollview expanded, singlechildscrollview flutter
Id: neAn35cY8y0
Channel Id: undefined
Length: 1min 59sec (119 seconds)
Published: Thu Feb 24 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.