exchange
I want to add in my project this. How can i do something like that or similar?
U can use row widgets for this and nest them
Row(
Row()
Row()
)
Use listview builder to display all the set of rows
Eg question Flutter nested Rows MainAxisAlignment
Related
I don't want to use 3rd part, so I am trying to achieve something simple, just use SingleChildScroolView inside a Column, but it is not working.
The widgets that I have are these:
Scaffold
Padding
Column
Obx
Divider
Obx
Column
Table <--- This is the table header
SizedBox
Table <--- I want to put SingleChildScrollView here to make this table scrollable
When I specify the height of the last table, it works, but I don't want to do it because it will be hardcoded and fixed... not good, like this:
SizebBox
height: 300
SingleChildScrollView
Table
I tried this, but hangs:
Expanded
SingleChildScroolView
Table
How to solve this? What am I doing wrong? Can this be fixed?
Thanks
SOLVED.
Guys, I found the problem...
I was trying to put SingleChildScrollView inside a Column, but this Column is inside another Column. AND THIS WAS THE PROBLEM (scrool inside a column that is inside another column)...
I change everything and now I am working with only ONE COLUMN, and SingleChildScrollView can work!
Follow the code:
https://flutlab.io/editor/0b329333-cacb-4903-89bb-053c51a18bd9
Hope this can help someone else.
Thank you all
I want to add a similar item between my SliverAppBar and SliverList. I tried using a regular Row, but it kept throwing an exception. I know about SliverPadding, so I was wondering if there's something similar. Any help would be greatly appreciated.
try SliverToBoxAdapter, reference:
SliverToBoxAdapter(
child: Row
)
I am trying to make a row of widgets with a small text below them mentioning what that button is for. One of the label is supposed to be multi lined but this is affecting the button in the column. How can I align them properly without it affecting the buttons placed?
My Widget Structure is something like this:
Column -> Row -> Column -> GestureDetector, Text
Try to add crossAxisAlignment: CrossAxisAlignment.start at the Row containing all the widgets.
If that doesn't work, post all of the widget parent's code
Hello I am trying to show some data to user with ListView but I get exactly this error:
*RenderFlex children have non-zero flex but incoming height constraints are unbounded.
My Code is Exactly Like Below,
Expanded(child:
ListView(children:tWidgets),),]);
My Code works fine without ListView like this
return Column(children: tWidgets,);
Expanded Widgets only work inside Row and Column widgets, they cannot be used outside of these two widgets, so your solution will be like this
return Column(children: [
Expanded( child: ListView(children: tWidgets,),)
],
);
try
ListView(
shrinkWrap: true,
https://api.flutter.dev/flutter/widgets/ListView-class.html
I solved this issue by fixing the order of my interface.
ListView was inside a Column and that column was also inside another column. I simply deleted a column.
if you are facing with this problem check the hierarchy of your interface.
How can I use condition in widget? I did it with empty widget like container() or Text() but when I put empty Widget in row() and give spaceBetween of MainAxisAlignment it takes their own space without any showing. Searching on the internet I think there are only the old info so that's not working anymore (if I am wrong I'm really sorry).
If conditions are not allowed and I do not want to show the widget - How can i do that?
If i understand correctly, you want to render Row conditional with size of childrens.
List<Widget> elements = []
Row(children: elements)
First option is to initiate elements inside your initState(){} method.
Another one, if you want to change it dynamically, then you have to know about setState(){} method and how key works, that is optional attribute of all Stateful/Stateless Widgets.