How to synchronize flutters pageTransition with a numeric (0-1) user input - flutter

I am building my own bottom sheet and want to synchronize closing the sheet with transitioning to the underlying page.
Animation of the page before popping is not an option for my use case.
I am using Navigator with a PageRouteBuilder to animate between pages.
Could someone provide me with a resource on how to achieve this?

Related

How to implement figma's smart animate option in flutter?

I designed three onboarding pages in figma which contains information about my app, while wireframing the app, I added smart animate to the three pagesThis is the first onboarding page
The second one
The third one
The smart animate enables smooth transition from each page to each page
While using flutter, I created 3 different pages for each onboarding pages and added a navigation widget to each button
But the navigation from each page to each page was stacked
I also tried using gesturedetection() onhorizontalswipe still same result
The pages navigate in a stacked way totally different from figma's smart animate option.
Is there anyway I can do this?
I'll appreciate any help
Thanks in advance.
From what I understood,
You want to build an onboarding screen with some animation. But the pages are being stacked.
It is happening because you are navigating to different pages with each button press. That is very bad practice for building an onboarding screen.
You should be using a PageView widget that allows you to transit between pages without navigating to them.
If you want to use a plugin that suits you, I would recommend introduction_screen

How do you create a side navigation drawer that persists across pages?

I've looked through many tutorials for the side nav drawer. I can create one that works fine to lead to different pages. However, when I travel to a page that's different from home, it only gives me the arrow icon to go back to home at the top left instead of keeping the button to bring me back to the side navbar. How can I prevent this?
I can't use the home page to navigate everywhere because it's just supposed to be a blank splash screen.
You can define your drawer in a separate widget file, that you can import everywhere you have a scafold.
I created a package for it because I was missing similar functionality. If you want a Flutter approach for this navigation check out: https://api.flutter.dev/flutter/material/NavigationRail-class.html
Or if you want to have a look at my package: https://pub.dev/packages/side_navigation
It's because you're moving to a new page/Scaffold (probably using Navigator.push()). So, the default button in the AppBar will be the back button.
You can either have the same Drawer in every Scaffold you navigate to, which is not recommended since you'll just keep pushing routes to the navigation stack.
Or, you can change pages within the Scaffold. Check the interactive examples in BottomNavigationBar and NavigationRail to get an idea of how to do it. Basically instead of calling Navigator.push() when a tile in Drawer is tapped, just update the selected index and call setState().

Redirect gestures to another widget

I'm looking for a way to redirect gestures(touches) from one widget to another. The use case for this is that I need to show a transparent screen(bottom sheet) above another screen(map) using Navigator and redirect gestures from that transparent screen to the one below.
Unfortunately Navigator route absorbs all gestures at the root level, thus they cannot pass-through. I'm also unable to use IgnorePointer because there are interactive elements in the transparent screen.
Is there a way to do this?
p.s. I'm aware that OverlayEntry solves this, but I'm looking for a way to achieve this using Navigator

Smooth animated transition with valuelistenablebuilder

I have designed a simple dashboard menu using valuelistenablebuilder which basically changes based on the selected icon.
Here's an example of how it looks
Whenever i click one of the dashboard buttons (cards inside a gridview), it updates the listennablevalue, and thus it leads to a similar view but the number of buttons (and the content within the button) changes.
however, there is no transition or animation as the basic material pageroute given the builder is just rebuilding the view.
Is there a way to add a smooth transition using this listener?

Flutter custom page transition - animating old route

I want to create custom page transition animation in Flutter. I have two pages/routes:
List of radios page (LISTPAGE)
Radio detail page (DETAILPAGE)
Here is transition that I need to create.
Look only to 0:18 seconds.
As I know, Flutter enabled to use transitionBuilder inside PageRouteBuilder when pushing new route. But how can I animate widgets in LISTPAGE as part of transition to DETAILPAGE? Is it possible?
Flutter have only few transition widgets - ScaleTransition, SlideTransition, FadeTransition, ...
Is it even possible to create something like this?
How would you approach this design?