Closed neofactoris3 closed 1 year ago
@neofactoris3 can you please share your setup so I can reproduce this?
@neofactoris3 I think your link is broken?
Where are you initializing your PageController?
class _GetAppState extends State<GetApp> {
PageController _controller = PageController(initialPage: 0);
}
Any updates?
I have tried to set a key as well but it does no work...
new SmoothPageIndicator( key: PageStorageKey('smoothPageIndicatorKey'), controller: _controller, count: snapshot.data['unreadNews'] .toList() .length, effect: SlideEffect( spacing: 4.0, radius: 4.0, dotWidth: 12.0, dotHeight: 6.0, paintStyle: PaintingStyle.fill, dotColor: Colors.grey .withOpacity(0.3), activeDotColor: Color( 0xff449e47)), ),
Any help is much appreciated...
Thank you!
@neofactoris3 Sorry for keeping you waiting, I was actually really busy lately. I'll look into it today.
you're using TabView to handle your tabs right?
@neofactoris3 I failed to reproduce the error. could you create a gist of a working example?
@neofactoris3 This might help https://github.com/Milad-Akarie/auto_route_library/issues/81#issuecomment-620580590
I had tried it earlier... It was not working...
In fact, the page viewer does not lose the state, when I navigate back to the parent page, I can see the pageviewer retains the page I left it but smooth_page_indicator active dot is at the first position, however, if I slide the page, the active dot goes back to the exact location.
smooth_page_indicator is sharing the same state with the pageView so this's really confusing lol
This is what happens... Video demonstration
@neofactoris3 I see.. What are you using to manage your tabs? TabView?
@neofactoris3 you can use FutureBuilder to wrap SmoothPageIndicator. Ref: https://stackoverflow.com/questions/61058420/flutter-pagecontroller-page-cannot-be-accessed-before-a-pageview-is-built-with
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
When moved to a different tab and returned, the active dot moves to the first position but on scroll change, it moves to the correct position. How to ensure that the active dot state is preserved when moving to different tabs etc?