refactor booking page to use PageController and remove legacy implementation

This commit is contained in:
mohammad
2025-07-23 14:34:59 +03:00
parent 8f71fcb96a
commit a56e422bf5
3 changed files with 10 additions and 62 deletions

View File

@ -19,7 +19,8 @@ import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/constants/assets.dart';
class BookingPage extends StatefulWidget {
const BookingPage({super.key});
final PageController? pageController;
const BookingPage({super.key, this.pageController});
@override
State<BookingPage> createState() => _BookingPageState();
@ -41,12 +42,15 @@ class _BookingPageState extends State<BookingPage> {
),
),
],
child: _BookingPageContent(),
child: _BookingPageContent(widget.pageController),
);
}
}
class _BookingPageContent extends StatefulWidget {
final PageController? pageController;
const _BookingPageContent(this.pageController);
@override
State<_BookingPageContent> createState() => _BookingPageContentState();
}
@ -174,7 +178,9 @@ class _BookingPageContentState extends State<_BookingPageContent> {
SvgTextButton(
svgAsset: Assets.homeIcon,
label: 'Manage Bookable Spaces',
onPressed: () {},
onPressed: () {
widget.pageController!.jumpToPage(2);
},
),
const SizedBox(width: 20),
SvgTextButton(