I have a Wrap with different containers inside with a GestureDetector and a text as child (each container has a different text inside than the others),
I would like onTap for each container to create a Container at the bottom of the screen with the same text as the Container inside.
Can anyone explain to me how I could do it?
Hope someone can help me.
Thank you :)
The widget that has all these can have an onTextChanged function that does setState to save the text to a variable, which is used in the build function to put that text at the bottom of the screen. Then you can call that onTextChanged from each GestureDetector to put its own text on the bottom.
You can improve it a bit by creating a widget for those Containers and pass that onTextChanged function to that widget.
Related
I want to add a buttombar to my application Contains only just one text with background color .
I need it to write the copyright in my application, but I find just that I have to add At least a two-item
In the list,
I don't need this
Just i want to add a single one text with a background color
In your case you do not need a bottombar widget.
you can create a container with specific height and background color and center a text widget in the container.
If you are looking to add bottomNavigationBar with one item only you can just write your own widget in the bottom navigation bar like a Container and set a background of your choice and give it a child widget wrapped in an INKWELL or GESTUREDETECTOR and if it overlaps with the Phone's GUI you can wrap the inkwell with SAFEAREA widget
I try to make a container who is on another container in the border like that:
I want do that without TextField. For the moment I have just
To be more clear it's like a textfield without a textfield.
You can use Stack and Positioned for this custom.😀
I currently have a ListView.builder of containers that expand once I tap it. However, I'd like the containers to center in on the expanded container that was tapped.
List of items mockup
Expanded Container mockup
Currently, if I tap on No.2 from the Expanded Container mockup picture, the container will expand but it won't snap/focus on that container. I'd like to find a way to make this possible.
Thank you in advance!
This is like a dropdown menu but doesn't accept any ontap function, just readability.
Please see the image to know how it looks and works
Use a listview of widgets and wrap each widget in the list with flutter-expandable
Check this
https://github.com/aryzhov/flutter-expandable/blob/master/README.md
Im trying to make an new app, and i want to display a row like this
i dont understand the concept behind it, like how can he divide the box into two type of colors, and how can the shape of the box looks like that. anyone that can teach me i will appriciated it.
This is not exactly a simple UI layout to create if you are just starting out with Flutter.
Simply put, you have to have a Row containing copies of a widget you create yourself as a stateless widget. The widget tree would look something like this.
Row
CustomWidget
CustomWidget
...
The CustomWidget is the complex part, this is a simplified example of how the Widget tree of this widget could look. Create a stateless widget and try to create it yourself.
Card
Column
Container
Row
Icon
Text
Container
Align
Text
Note you will have to set the color property of the Card and Container widgets, and add some padding certain places in the widget tree. Plus, the last container will need a width property as well.
If you need more help - show what you have attempted with code (edit your question)
Hope this helps!