Skip to content

Commit

Permalink
feat(digital-guide): apply pr's fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolaj-jalocha committed Jan 16, 2025
1 parent b0a0c39 commit a1de560
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "package:freezed_annotation/freezed_annotation.dart";

part "digital_guide_room.freezed.dart";

part "digital_guide_room.g.dart";

@freezed
Expand All @@ -27,18 +28,16 @@ class DigitalGuideTranslationsRoom with _$DigitalGuideTranslationsRoom {

@freezed
class DigitalGuideTranslationRoom with _$DigitalGuideTranslationRoom {
@JsonSerializable(fieldRename: FieldRename.snake)
const factory DigitalGuideTranslationRoom({
@JsonKey(name: "name") required String name,
@JsonKey(name: "room_purpose") required String roomPurpose,
@JsonKey(name: "location") required String location,
@JsonKey(name: "working_days_and_hours")
required String name,
required String roomPurpose,
required String location,
required String workingDaysAndHours,
@JsonKey(name: "are_entrances_comment") required String areEntrancesComment,
@JsonKey(name: "is_one_level_floor_comment")
required String areEntrancesComment,
required String isOneLevelFloorComment,
@JsonKey(name: "are_places_for_wheelchairs_comment")
required String arePlacesForWheelchairsComment,
@JsonKey(name: "comment") required String comment,
required String comment,
}) = _DigitalGuideTranslationRoom;

factory DigitalGuideTranslationRoom.fromJson(Map<String, dynamic> json) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,22 @@ class DigitalGuideRoomDetailView extends ConsumerWidget {
style: context.textTheme.headline
.copyWith(fontSize: 12, fontWeight: FontWeight.normal),
),
SizedBox(
height: roomInformation.workingDaysAndHours.isNotEmpty
? DigitalGuideConfig.heightMedium
: 0,
),
if (roomInformation.workingDaysAndHours.isNotEmpty)
const SizedBox(height: DigitalGuideConfig.heightMedium),
Text(
roomInformation.workingDaysAndHours.isNotEmpty
? "${context.localize.working_hours}:"
: "",
style: context.textTheme.headline,
),
SizedBox(
height: roomInformation.workingDaysAndHours.isNotEmpty
? DigitalGuideConfig.heightSmall
: 0,
),
if (roomInformation.workingDaysAndHours.isNotEmpty)
const SizedBox(height: DigitalGuideConfig.heightSmall),
Text(
roomInformation.workingDaysAndHours,
style: context.textTheme.body.copyWith(fontSize: 16),
),
SizedBox(
height: roomInformation.workingDaysAndHours.isNotEmpty
? DigitalGuideConfig.heightMedium
: 0,
),
if (roomInformation.workingDaysAndHours.isNotEmpty)
const SizedBox(height: DigitalGuideConfig.heightMedium),
Text(
context.localize.key_information,
style: context.textTheme.headline,
Expand All @@ -80,10 +71,8 @@ class DigitalGuideRoomDetailView extends ConsumerWidget {
: 0,
),
DigitalGuidePhotoRow(imagesIDs: room.imagesIds.toIList()),
SizedBox(
height: room.imagesIds != null && room.imagesIds!.isNotEmpty
? DigitalGuideConfig.heightMedium
: DigitalGuideConfig.heightSmall,
const SizedBox(
height: DigitalGuideConfig.heightMedium,
),
DigitalGuideNavLink(
onTap: () {},
Expand Down

0 comments on commit a1de560

Please sign in to comment.