mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 04:04:55 +00:00
Added page swipe for navigation
This commit is contained in:
@ -14,19 +14,26 @@ class AppBody extends StatelessWidget {
|
||||
return BlocBuilder<NavCubit, NavState>(
|
||||
builder: (context, state) {
|
||||
return Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
Assets.imagesBackground,
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
Assets.imagesBackground,
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
opacity: 0.4,
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
opacity: 0.4,
|
||||
),
|
||||
),
|
||||
child: NavCubit.of(context).currentPage,
|
||||
);
|
||||
child: PageView(
|
||||
onPageChanged: (int index) {
|
||||
NavCubit.of(context).updatePageIndex(index);
|
||||
},
|
||||
controller: NavCubit.of(context).pageController,
|
||||
children: NavCubit.of(context).pages,
|
||||
)
|
||||
// NavCubit.of(context).currentPage,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user