which class or widget to use a better responsive layout in the flutter? - flutter

This class or widget is useful to create a responsive layout.
AspectRatio
CustomSingleChildLayout,
CustomMultiChildLayout,
FittedBox,
FractionallySizedBox,
LayoutBuilder,
MediaQuery,
MediaQueryData,
OrientationBuilder.
Which is to use the better responsive layout.

iDecode already told you that it all depends on what you need. here take a look at official documentation, https://flutter.dev/docs/development/ui/layout.
And here is my advice
Use row when you need Horizontal layout
Use column when you need Vertical layout
Use singleChildScrollView when you need scrolling layout
Use either GridView or listView when you need repetitive view
Use Expanded, Flexible, Limitedbox, flexiblebox for adjusting the size of the widget

Mine favourite : Rows for Horizontal, Column for vertical, Scrollview for Extra data exist in the page or UI not fitted in the screen, ListView for TableView UI etc
For best fitting layout: IS Expanded, AspectRatio

Related

Flutter grid with different size

how to create grid. My issue is that I want to display widget in my grid view and each one of these widgets has its own content and can have different width, I am facing trouble with achieving that…
GridView, Wrap, ListView, Rows + Columns, Stack.
You can use Wrap widget. Also check flutter_staggered_grid_view package.

what is the equivalent to Filexible in slivers flutter?

SliverFillRemaining is the same as Expanded render box.. i need an equivalent to Flexible inside Slivers.
How Could I do so, so that i can make the widget fit it's content but could have infinity height inside a column?

Is there a way to make scrollPhysics to be the same as in ListView for Column widget?

The reason I'm asking is because I don't want to have a ListView I have a Column which fits me perfectly however the inability to scroll makes my app look irresponsive. How could I add my Column a more fluid scrollPhysics please?
I know that Column gets 100% of height of the screen and that's perfectly fine I just want to give it a responsive feel.
Warp the Column with SingleChildScrollView so that the Column will be scrollable, and you can specify the scroll scrollPhysics.

Use a ListView.builder and wrap widgets dynamically

I try to solve the following problem: I want to have a dynamically generated set of cards widgets which should be layed out horizontal and wrap the line when the card is getting too big:
I was thinking of a ListView.builder but this can either go horizontal or vertical. More, a gridview seems also not the best option as I have no fixed columns or rows. Is there any way in doing so or exists there maybe a widget I am not aware of currently?

Differences between SliverList vs ListView in Flutter

What are the differences between SliverList and ListView in Flutter?
There's almost no difference.
ListView is a SliverList. Same with GridView, which is a SliverGrid.
They are doing exactly the same thing. The only difference between them is that SliverList is a sliver, not a widget. Which means it's used inside a ScrollView, usually CustomScrollView.
ListView is nothing else but a biding of SliverList to transform it into a Widget to make it usable alongside other widgets such as Row/Container.
Most of the time, use ListView.
But if you want advanced scroll behavior such as appbar animations with scroll ; you'll need to use a CustomScrollView. Which will force you to use SliverList instead of ListView.
According this article,
All of the scrollable views you use, like ListView and GridView,
are actually implemented using Slivers. You can kind of think of
Slivers as a lower-level interface, providing finer-grained control on
implementing scrollable area. Because slivers can lazily build each
item just as it scrolls into view, slivers are particularly useful for
efficiently scrolling through large numbers of children.