Definition: A ScrollView in Flutter allows the user to scroll through a single child widget.
Common Properties:
reverse: Reverses the scrolling direction.
padding: Adds padding to the content.
2. ListView
Theory (Short Questions)
ListView
A scrollable widget in Flutter that displays a list of items vertically or horizontally. It is highly customizable and supports different constructors for various use cases.
ListView()
The simplest constructor for creating custom lists manually. Ideal for small, static lists of widgets.
ListView.builder
Efficient for large datasets as it builds items only when needed. Reduces memory usage by creating widgets on-demand.
ListView.separated
Adds a separator widget between list items for better organization. Useful for visually distinguishing list elements.
ListView.custom
Allows creating advanced lists with custom behaviors. Offers flexibility to design unique scrolling experiences.
ListTile
A widget in Flutter that creates a single fixed-height row. It includes optional leading and trailing widgets, along with a title and subtitle.
leading
Displays a widget, like an icon or avatar, before the title.
title
The primary content of the tile, typically a text widget.
trailing
Shows a widget, like an icon or button, after the title for additional actions.
subtitle
Displays additional information below the title, often in smaller text.
Comments
Post a Comment