use final for bookablespacesModel

This commit is contained in:
Rafeek-Khoudare
2025-07-21 14:36:08 +03:00
parent b12903059d
commit 327be5aa54
2 changed files with 5 additions and 5 deletions

View File

@ -1,10 +1,10 @@
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/models/bookable_space_config.dart'; import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/domain/models/bookable_space_config.dart';
class BookableSpacemodel { class BookableSpacemodel {
String spaceUuid; final String spaceUuid;
String spaceName; final String spaceName;
BookableSpaceConfig? spaceConfig; final BookableSpaceConfig? spaceConfig;
String spaceVirtualAddress; final String spaceVirtualAddress;
BookableSpacemodel({ BookableSpacemodel({
required this.spaceUuid, required this.spaceUuid,

View File

@ -50,7 +50,7 @@ class BookableSpacesBloc
bookingStartTime: event.updatedBookableSpaceConfig.bookingStartTime, bookingStartTime: event.updatedBookableSpaceConfig.bookingStartTime,
cost: event.updatedBookableSpaceConfig.cost, cost: event.updatedBookableSpaceConfig.cost,
); );
editedBookableSpace.spaceConfig = config; editedBookableSpace.copyWith(spaceConfig: config);
final index = event.bookableSpaces.data.indexWhere( final index = event.bookableSpaces.data.indexWhere(
(element) => element.spaceUuid == event.bookableSpace.spaceUuid, (element) => element.spaceUuid == event.bookableSpace.spaceUuid,
); );