-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Digital Guide structure tab #538
Open
24bartixx
wants to merge
15
commits into
main
Choose a base branch
from
feat/digital-guide-structure-tab
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4d1cbd3
fix: delete new Flutter project from ios directory XDD
24bartixx 519a294
fix: comma
24bartixx dd299a4
chore: models
24bartixx f7aeee3
chore: add region repository and present data in region view
24bartixx f693954
feat: corridor page
24bartixx d220edd
chore: format and commas
24bartixx 6b8aca8
fix: size of SizedBoxes
24bartixx 0b4a4a9
fix: review changes
24bartixx 733aac8
refactor: RegionData typedef and separate repositories
24bartixx 078da84
refactor: avoid redundancy in region view
24bartixx 3bafb22
chore: merge to be up to date
24bartixx 3c9ff25
init: separate domain logic
24bartixx 78334cb
refactor: lifts
24bartixx 930ee1c
refactor: lodges
24bartixx 9b6d7ae
refactor: dressing rooms
24bartixx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
lib/features/digital_guide_view/tabs/structure/data/models/corridor.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import "package:fast_immutable_collections/fast_immutable_collections.dart"; | ||
import "package:freezed_annotation/freezed_annotation.dart"; | ||
|
||
part "corridor.freezed.dart"; | ||
part "corridor.g.dart"; | ||
|
||
@freezed | ||
class Corridor with _$Corridor { | ||
@JsonSerializable(fieldRename: FieldRename.snake) | ||
const factory Corridor({ | ||
required CorridorTranslations translations, | ||
@JsonKey(fromJson: stringToBool) required bool isSimpleCorridorLayout, | ||
@JsonKey(fromJson: stringToBool) required bool isFloorMarked, | ||
@JsonKey(fromJson: stringToBool) required bool areRoomsEntrances, | ||
@JsonKey(fromJson: stringToBool) required bool isInformationBoard, | ||
@JsonKey(fromJson: stringToBool) required bool areRoomPurposeDescribedInEn, | ||
@JsonKey(fromJson: stringToBool) | ||
required bool isConsistentLevelColorPattern, | ||
@JsonKey(fromJson: stringToBool) required bool arePictorialDirectionalSigns, | ||
@JsonKey(fromJson: stringToBool) required bool areSeats, | ||
@JsonKey(fromJson: stringToBool) required bool areVendingMachines, | ||
@JsonKey(fromJson: stringToBool) required bool isEmergencyPlan, | ||
@JsonKey(name: "doors") required IList<int> doorsIndices, | ||
@JsonKey(name: "images") required IList<int> imagesIndices, | ||
}) = _Corridor; | ||
|
||
factory Corridor.fromJson(Map<String, dynamic> json) => | ||
_$CorridorFromJson(json); | ||
} | ||
|
||
@freezed | ||
class CorridorTranslations with _$CorridorTranslations { | ||
const factory CorridorTranslations({ | ||
@JsonKey(name: "pl") required CorridorTranslation plTranslation, | ||
}) = _CorridorTranslations; | ||
|
||
factory CorridorTranslations.fromJson(Map<String, dynamic> json) => | ||
_$CorridorTranslationsFromJson(json); | ||
} | ||
|
||
@freezed | ||
class CorridorTranslation with _$CorridorTranslation { | ||
@JsonSerializable(fieldRename: FieldRename.snake) | ||
const factory CorridorTranslation({ | ||
required String name, | ||
required String isSimpleCorridorLayoutComment, | ||
required String isFloorMarkedComment, | ||
required String areRoomsEntrancesComment, | ||
required String isInformationBoardComment, | ||
required String arePictorialDirectionalSignsComment, | ||
required String areSeatsComment, | ||
required String areVendingMachinesComment, | ||
required String vendingMachinesProducts, | ||
required String comment, | ||
}) = _CorridorTranslation; | ||
|
||
factory CorridorTranslation.fromJson(Map<String, dynamic> json) => | ||
_$CorridorTranslationFromJson(json); | ||
} | ||
|
||
bool stringToBool(String text) { | ||
return text.toLowerCase() == "true"; | ||
} |
34 changes: 34 additions & 0 deletions
34
lib/features/digital_guide_view/tabs/structure/data/models/information_point.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import "package:freezed_annotation/freezed_annotation.dart"; | ||
|
||
part "information_point.g.dart"; | ||
part "information_point.freezed.dart"; | ||
|
||
@freezed | ||
class InformationPoint with _$InformationPoint { | ||
const factory InformationPoint({ | ||
required InformationPointTranslations translations, | ||
}) = _InformationPoint; | ||
|
||
factory InformationPoint.fromJson(Map<String, dynamic> json) => | ||
_$InformationPointFromJson(json); | ||
} | ||
|
||
@freezed | ||
class InformationPointTranslations with _$InformationPointTranslations { | ||
const factory InformationPointTranslations({ | ||
@JsonKey(name: "pl") required InformationPointTranslation plTranslation, | ||
}) = _InformationPointTranslations; | ||
|
||
factory InformationPointTranslations.fromJson(Map<String, dynamic> json) => | ||
_$InformationPointTranslationsFromJson(json); | ||
} | ||
|
||
@freezed | ||
class InformationPointTranslation with _$InformationPointTranslation { | ||
const factory InformationPointTranslation({ | ||
required String location, | ||
}) = _InformationPointTranslation; | ||
|
||
factory InformationPointTranslation.fromJson(Map<String, dynamic> json) => | ||
_$InformationPointTranslationFromJson(json); | ||
} |
35 changes: 35 additions & 0 deletions
35
lib/features/digital_guide_view/tabs/structure/data/models/parking.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import "package:freezed_annotation/freezed_annotation.dart"; | ||
|
||
part "parking.freezed.dart"; | ||
part "parking.g.dart"; | ||
|
||
@freezed | ||
class Parking with _$Parking { | ||
const factory Parking({ | ||
required ParkingTranslations translations, | ||
}) = _Parking; | ||
|
||
factory Parking.fromJson(Map<String, dynamic> json) => | ||
_$ParkingFromJson(json); | ||
} | ||
|
||
@freezed | ||
class ParkingTranslations with _$ParkingTranslations { | ||
const factory ParkingTranslations({ | ||
@JsonKey(name: "pl") required ParkingTranslation plTranslation, | ||
}) = _ParkingTranslations; | ||
|
||
factory ParkingTranslations.fromJson(Map<String, dynamic> json) => | ||
_$ParkingTranslationsFromJson(json); | ||
} | ||
|
||
@freezed | ||
class ParkingTranslation with _$ParkingTranslation { | ||
@JsonSerializable(fieldRename: FieldRename.snake) | ||
const factory ParkingTranslation({ | ||
required String entryLocation, | ||
}) = _ParkingTranslation; | ||
|
||
factory ParkingTranslation.fromJson(Map<String, dynamic> json) => | ||
_$ParkingTranslationFromJson(json); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we have
stringToBool
somewhere else already?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do in some other models I guess but where should we define it then? It cannot be an extension.