Flutter Relocate Widget to Parent - flutter

In Flutter, what would be the best approach to relocate an entire Widget into a container in a parent.
I have an expanding accordion list. When an item is clicked on it expands to show more of its content. The Widget that contains this content also contains a new set of tools to place in the parent's bottom navigation. How do I get these tools there?
I'd also like to fade between the old tools and the new tools by supplying the same animation controller that opened this accordion to the bottom navigation.

Related

How to scale down a widget to display an overview in a grid view?

In my Flutter app, the user can create and edit multiple pages that are displayed in a PageView. The user can see one page at a time. Now I want to show an overview of all pages by shrinking the widgets and showing them in a Wrap layout widget.
I've tried this with the Transform.scale widget, but this keeps the original size of the page and just displays the child widget at a lower scale.Therefore this does not bring the desired effect in a wrap layout.

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

Flutter Recreating the Hero Transition replacing Navigator with a custom Animator

Looking at the Flutter Hero Transition, it appears to move the tagged Widgets to an Overlay class that exists in all Navigator Widgets but sits above the main content in the stack.
If this is correct, it allows the Hero to widgets to still respond to the Route scope and its animators but exist above the actual route content. How is this actually done efficiently? Surely this involves taking an entire Widget and storing it in a state for the duration of the animation. That Widget still has to respond to intrinsic responses from its original position such as slivers responding to active scroll actions.
Recreating this could be done with state management but I wondered how the standard hero actually does this. It seems like Widgets are effectively duplicated and then conditionally rendered on the screen defaulting to the overlay during the route animation and swapping out the original widget with an Offstage or similar. Is this how it is done?
The reason for trying to understand it is the need to replicate this behaviour in situations where Navigator is not an effective use case for a transition taking place internally on a page. I built an accordion style navigator but still want a hero transition to take place on the AppBar / NavigationBar. I know that this could be done with Navigator but it doesn't suit the use case. I could also predefine the AppBar content for each internal navigator state of the accordion but that is a lot of additional code.

Flutter: Change location injection in widget tree of DropDownMenuItem

I am using a DropdownButton in a Flutter app, and when you click it and the drop down appears, it overlays a webview that I'm using.
That all works perfectly, however webviews in Flutter, when run as a web app (which this is) trap all UI interactions and don't allow clicks to flow through to the Flutter UI elements.
There is a PointerInterceptor component that handles this perfectly, all I need to be able to do is wrap all of the DropdownMenuItems that appear inside of a single pointer interceptor (because if I individually wrap them then there is a really bad performance hit).
However - the DropdownMenuItems appear in the widget tree directly under the MaterialApp widget - and that is too high in the tree for me to wrap in a PointerInterceptor.
That is the reason that I want to know :
Is it possible to specify where in the widget tree the DropdownMenuItem widgets' appear when a DropdownMenuButton is clicked ?

Flutter Not able to achieve PageView like Swipeable Tabs inside Parent ListView

This is a Flutter Specific Query.
I Want to achieve the Layout Referenced in the Image above. Two Tabs
Below a Container.
The Tabs can be switched using Swipe Animation like that in a
Page View.
The Tabs Contain Dynamically Generated Widgets from Provider.
The Entire Page along with the Fixed Container must be
Scroll-able.
When Switching between the Tabs the fixed container should stay
in place and only tab Content(Column of Widgets) should swipe
left and right.
What I've Tried :
Using a Parent List View and Nesting the Fixed Container Child
and Using Tab Bar to switch the Widget using Animated Switcher and
Slide Animation. Here the Problem is i cannot swipe left and right
and create the Page View like Effect. I also tried Nesting Page-View
inside List-View but since the Page-View does not have a fixed height
( because the tab contents are dynamically generated ).
A few many more concepts i tried to tackle but the issue every time was
that the tab contents are not having a fixed height.
I really want to achieve this Layout and i want to know if there's any way.