How to open second container in Flutter when I click on IconButton? - flutter

I added Row widget with rendering on stack widget. I actually want to add more container, but it shows when I click on IconButton. After clicking it does not shows on screen. So how is possible in Flutter ?
Any suggestion?

you could create a stack widget and when the IconButton is pressed you call a function to display the new container( which probably is inside the stack widget you are going to implement)

Related

Flutter Custom Drawer to Default in Existing code

i'm new in flutter i have a project that used Custom drawer menu as shown below
enter image description here
there's 2 files that should be edited i think
main_screen.dart this file contains menu items
main_screen.dart Code
Menu_screen.dart CODE
i've Replaced all instances of CustomDrawer with Drawer in your code. Remove the CustomDrawerController class and its usage. but still i got errors can you guide me how can i change to default drawer menu easily?
i've replaced CustomDrawer to Drawer but it seems won't work
In order to create UI like this you have to create a stack widget and in the stack place your drawer widget and on the top of the drawer widget place your main screen widget and in the main screen create a button on the onpressed of that button the main screen will be made small and shifted to the side drawer will be visible
the full code is here
https://github.com/singh-saheb/pet_ui_flutter.git
and the video explanation is here
https://www.youtube.com/watch?v=Cg9vLhfvWBE

How to make slide in transition for ListTile in listview in Flutter

I am making an app whose structure is very simple.
A ListView with Listtiles in it.
I want to add animation such that when the screen is opened the listtiles slide in.
Flutter provides a AnimatedList Widget.
Perhaps this native widget will give you the desired output

What is the diffrent between OverlayEntry and Stack widget in flutter?

I want to show an floating notification widget on the entire widgets of the application (on the top of MaterialApp widget).
So i find two possible way to do that :
wrap MaterialApp widget with a Stack widget
insert my widget as OverlayEntry (Overlay.of(context).insert(MyNotificationOverlay()))
So i'm confused to choice best option to improve performance of the app for this requirement(showing notificatioin as floating widget entire the app (for example i want to show upload progress with this notification))
Thanks for your help
OverlayEntry creates in top of widgets. but after finish using you will remove it. If you can write your code by Stack use Stack widget.
Overlay is an kind of dynamic stack. Whenever you want to show some widgets at some specific time (like it would be in an stack) we use overlay. Else when we are sure to have some things in form of stack already, we use stack.
The overlayentry use custom stack but the broblem with overlayEntry it rebuild it self when you use some widget outside it like
Pupop menu button and when writing text form feild .

GestureDetector in Flutter: how to detect long press into vertical drag?

I have a question about the GestureDetector widget in Flutter. I have the following situation: I have two buttons. I want to do something when the first button is long pressed. Then I want to do something when the user drags vertically over the second button still in press from the first button.
How can I do this with the GestureDetector widget in Flutter?
There is a draggable class on flutter that will serve better your purpose check this https://api.flutter.dev/flutter/widgets/Draggable-class.html

How to add and delete widget dynamically in flutter?

Here I added Stack widget in scaffold body. I added full screen image as background image and set edit text widget functionality on image.
I want to add Multiple Text Widget with delete and add widget functionality on button click in flutter. I mean when I Press on any particular Text widget it become enable and if I press on delete Icon, this particular selected widget delete on the stack widget.
How it could be possible in flutter? Any suggestion for it or I should use any other widget rather than Stack widget for this functionality.