I am developing a kind of Twitter with Flutter, and I am encountering a problem with pageView.builder.
I want to create the same profile navigation that Twitter and Instagram are using : I mean I have a NestedScrollView which is my FeedPage and it contains a List of post tiles.
The feature I want is when I click on a tile, pageView build the user profile associated and show up as Twitter does. I used a Navigator.push whichs leads to the user concerned but it doesn't keep my BottomAppBar.
Images are better than words : Illustration
Thanks for your futur help and have a nice day !
There is a package in the pub to have a persistent bottom navigation: https://pub.dev/packages/persistent_bottom_nav_bar.
Related
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
my job is to create a few widgets using widgetkit and swiftui, however the main project is build on uikit so I am not very good with swiftUI. Nevertheless, I would like to know whether I can add a graph inside of, for example, medium sized widget, and can the graph be scrollable to reveal more information? Or could it only be clickable? Thank you.
I know how widgets work, just interested in whether it is possible to create a scrollable graph inside of a medium sized widget.
I'm only just getting started with widgets myself, so happy to be corrected. But interactivity with widgets is very limited - effectively to taps and nothing else. They're designed more to be informational displays than interactive user interfaces.
If your widget is larger than the small size (the square one that takes up the same space as 2x2 app icons on the iPhone home screen), you can have multiple tap targets. For example, if your widget had a list of calendar items, you could set it up so that a user tapping on a specific item opened the app with a view showing that item in more detail.
So no, a scrollable graph isn't feasible. But what you can do is create a graph that shows a snapshot of data that a user is most likely to find useful when glancing at their home screen – and making sure that if they tap on it, they go straight through to a more interactive version of the same data.
I have a problem with my Here Maps Navigation. I can start the navigation on my flutter app but every time I open another page on the app and come back to the navigation page, it restarts the navigation. It tries to get the current location again, takes a lot of time to do that, and shows the default "invalid" map page. I want the navigation to save it's current state even if I change the view to another page on my app and come back to navigating. Is there a way to do this? Am I missing something here?
I finally found a way to solve it by saving the state of my Flutter pages. I used the PageView widget for the main.dart's scaffold body and AutomaticKeepAliveClientMixin on the pages I wanted to save the states of. You can check this YouTube video for how to implement this: https://www.youtube.com/watch?v=fGe45NikVqE
How to make floating overlay widget, looks like facebook chat head in flutter??
Flutter floating overlay widget
i need help guys, What i do now?
What i'am doing picture
You can create a draggable chat button by checking below link. But it will be inside the application.
Inside app - https://medium.flutterdevs.com/draggable-floating-action-button-in-flutter-2149a7e47f06
If you want to draw the draggable view outside the application, check https://pub.flutter-io.cn/packages/system_alert_window plugin. Here, you need to do minor tweeks.
Apart from this, other approach is to write the code in native and access it to flutter via method channel
For native - https://medium.com/#kevalpatel2106/create-chat-heads-like-facebook-messenger-32f7f1a62064
The question is, how to achieve this with a clean navigation approach in Flutter.
So to better understand the question, here's an example:
The user taps on a messenger notification and the app opens. The first screen to show is a setup screen, which verifies if the user authenticated and does some app related stuff. The next screen should be the chat with the corresponding message. After closing this chat screen, the user lands on the screen containing a list with all chats. After closing this one, the user lands on the home screen of the app.
What is the best and cleanest approach to handle such a scenario? Should I use a separate navigation package like auto_route or what do u suggest?
Or is this a deep link scenario? How to implement such a scenario?
Define static String id for all screen,after define them under MaterialApp as
routes (map<Sting, Function>) after you have to give parameter to initial route still under MaterialApp, now you can use these routes by using Navigator.pushNaned and Navigator.pop function.