Fixed the overflow in the login screen, the page is scrollable.

- Fixed Scrolling wasent working in login screen
- Changed Home page to indexed based view instead of PageView
This commit is contained in:
Mohammad Salameh
2024-03-19 13:29:12 +03:00
parent 79279180df
commit 42051bb977
10 changed files with 148 additions and 373 deletions

View File

@ -17,10 +17,8 @@ class NavCubit extends Cubit<NavState> {
static NavCubit of(context) => BlocProvider.of<NavCubit>(context);
//functoin to do the important work when the user logs out
static clear() {
pageIndex = 0;
pageController.jumpToPage(0);
}
static int pageIndex = 0;
@ -146,12 +144,9 @@ class NavCubit extends Cubit<NavState> {
const MenuView(),
];
static final PageController pageController = PageController();
void updatePageIndex(int index) {
pageIndex = index;
pageController.animateToPage(index,
duration: const Duration(milliseconds: 150), curve: Curves.easeIn);
emit(NavChangePage());
}
}