From 0c0f26bec7955b3d105dd0ed774703b70c1d1003 Mon Sep 17 00:00:00 2001 From: Rafeek-Khoudare Date: Mon, 21 Jul 2025 16:39:59 +0300 Subject: [PATCH] param not params --- .../data/remote_bookable_spaces_service.dart | 2 +- .../domain/params/bookable_spaces_params.dart | 4 ++-- .../domain/service/bookable_spaces_service.dart | 2 +- .../bookable_spaces_bloc/bookable_spaces_event.dart | 2 +- .../screens/manage_bookable_spaces_screen.dart | 2 +- .../widgets/buttons_divider_bottom_dialog_widget.dart | 5 ++--- .../bottom_pagination_part_widget.dart | 10 +++++----- .../table_part_widget.dart | 2 +- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/pages/access_management/manage_bookable_spaces/data/remote_bookable_spaces_service.dart b/lib/pages/access_management/manage_bookable_spaces/data/remote_bookable_spaces_service.dart index 44656482..ceebf262 100644 --- a/lib/pages/access_management/manage_bookable_spaces/data/remote_bookable_spaces_service.dart +++ b/lib/pages/access_management/manage_bookable_spaces/data/remote_bookable_spaces_service.dart @@ -13,7 +13,7 @@ class RemoteBookableSpacesService implements BookableSpacesService { static const _defaultErrorMessage = 'Failed to load Bookable Spaces'; @override Future> load( - BookableSpacesParams param) async { + BookableSpacesParam param) async { try { final response = await _httpService.get( path: ApiEndpoints.bookableSpaces, diff --git a/lib/pages/access_management/manage_bookable_spaces/domain/params/bookable_spaces_params.dart b/lib/pages/access_management/manage_bookable_spaces/domain/params/bookable_spaces_params.dart index 160ea60e..6007424b 100644 --- a/lib/pages/access_management/manage_bookable_spaces/domain/params/bookable_spaces_params.dart +++ b/lib/pages/access_management/manage_bookable_spaces/domain/params/bookable_spaces_params.dart @@ -1,6 +1,6 @@ -class BookableSpacesParams { +class BookableSpacesParam { final int currentPage; - BookableSpacesParams({ + BookableSpacesParam({ required this.currentPage, }); diff --git a/lib/pages/access_management/manage_bookable_spaces/domain/service/bookable_spaces_service.dart b/lib/pages/access_management/manage_bookable_spaces/domain/service/bookable_spaces_service.dart index 5929a935..208589ad 100644 --- a/lib/pages/access_management/manage_bookable_spaces/domain/service/bookable_spaces_service.dart +++ b/lib/pages/access_management/manage_bookable_spaces/domain/service/bookable_spaces_service.dart @@ -4,5 +4,5 @@ import 'package:syncrow_web/pages/space_management_v2/main_module/shared/models/ abstract class BookableSpacesService { Future> load( - BookableSpacesParams param); + BookableSpacesParam param); } diff --git a/lib/pages/access_management/manage_bookable_spaces/presentation/blocs/bookable_spaces_bloc/bookable_spaces_event.dart b/lib/pages/access_management/manage_bookable_spaces/presentation/blocs/bookable_spaces_bloc/bookable_spaces_event.dart index 7c5344c8..c73f08dc 100644 --- a/lib/pages/access_management/manage_bookable_spaces/presentation/blocs/bookable_spaces_bloc/bookable_spaces_event.dart +++ b/lib/pages/access_management/manage_bookable_spaces/presentation/blocs/bookable_spaces_bloc/bookable_spaces_event.dart @@ -8,7 +8,7 @@ sealed class BookableSpacesEvent extends Equatable { } class LoadBookableSpacesEvent extends BookableSpacesEvent { - final BookableSpacesParams param; + final BookableSpacesParam param; const LoadBookableSpacesEvent(this.param); } diff --git a/lib/pages/access_management/manage_bookable_spaces/presentation/screens/manage_bookable_spaces_screen.dart b/lib/pages/access_management/manage_bookable_spaces/presentation/screens/manage_bookable_spaces_screen.dart index 11c43cdb..155049e4 100644 --- a/lib/pages/access_management/manage_bookable_spaces/presentation/screens/manage_bookable_spaces_screen.dart +++ b/lib/pages/access_management/manage_bookable_spaces/presentation/screens/manage_bookable_spaces_screen.dart @@ -33,7 +33,7 @@ class _ManageBookableSpacesPageState extends State { RemoteBookableSpacesService(HTTPService()), )..add( LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: 1), + BookableSpacesParam(currentPage: 1), ), ), ), diff --git a/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/buttons_divider_bottom_dialog_widget.dart b/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/buttons_divider_bottom_dialog_widget.dart index 80981897..0e13370f 100644 --- a/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/buttons_divider_bottom_dialog_widget.dart +++ b/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/buttons_divider_bottom_dialog_widget.dart @@ -71,7 +71,7 @@ class ButtonsDividerBottomDialogWidget extends StatelessWidget { ); context.read().add( LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: 1), + BookableSpacesParam(currentPage: 1), ), ); } else if (nonBookableState is NonBookableSpacesError) { @@ -79,8 +79,7 @@ class ButtonsDividerBottomDialogWidget extends StatelessWidget { SnackBar( content: Text( nonBookableState.error, - style: - const TextStyle(color: ColorsManager.red), + style: const TextStyle(color: ColorsManager.red), ), duration: const Duration(seconds: 2), behavior: SnackBarBehavior.floating, diff --git a/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/bottom_pagination_part_widget.dart b/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/bottom_pagination_part_widget.dart index 104425c3..d48518a9 100644 --- a/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/bottom_pagination_part_widget.dart +++ b/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/bottom_pagination_part_widget.dart @@ -25,7 +25,7 @@ class PaginationButtonsWidget extends StatelessWidget { onTap: () { context.read().add( LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: currentPage - 2), + BookableSpacesParam(currentPage: currentPage - 2), ), ); }, @@ -41,7 +41,7 @@ class PaginationButtonsWidget extends StatelessWidget { onTap: () { context.read().add( LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: currentPage - 1), + BookableSpacesParam(currentPage: currentPage - 1), ), ); }, @@ -59,7 +59,7 @@ class PaginationButtonsWidget extends StatelessWidget { if (i != currentPage) { context.read().add( LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: i), + BookableSpacesParam(currentPage: i), ), ); } @@ -97,7 +97,7 @@ class PaginationButtonsWidget extends StatelessWidget { onTap: () { context.read().add( LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: currentPage + 1), + BookableSpacesParam(currentPage: currentPage + 1), ), ); }, @@ -113,7 +113,7 @@ class PaginationButtonsWidget extends StatelessWidget { onTap: () { context.read().add( LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: currentPage + 2), + BookableSpacesParam(currentPage: currentPage + 2), ), ); }, diff --git a/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/table_part_widget.dart b/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/table_part_widget.dart index a0ce8ace..35305163 100644 --- a/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/table_part_widget.dart +++ b/lib/pages/access_management/manage_bookable_spaces/presentation/widgets/main_manage_bookable_widgets/table_part_widget.dart @@ -28,7 +28,7 @@ class TableOfBookableSpacesWidget extends StatelessWidget { onPressed: () => context .read() .add(LoadBookableSpacesEvent( - BookableSpacesParams(currentPage: 1), + BookableSpacesParam(currentPage: 1), )), child: const Text('Try Again')) ]);