Overview
TheWondersLogic class manages all data related to the seven wonders of the world in the Wonderous app. It provides access to wonder-specific information and defines the timeline year ranges for historical context.
Class Definition
Properties
A list containing data for all seven wonders. Populated during initialization with instances of wonder-specific data classes.
The starting year for the app’s timeline view. Set to
-3000 (3000 BCE).The ending year for the app’s timeline view. Set to
2200 (2200 CE).Methods
init()
Initializes the wonders data by populating theall list with instances of each wonder’s data class.
- Great Wall of China (
GreatWallData) - Petra (
PetraData) - Colosseum (
ColosseumData) - Chichen Itza (
ChichenItzaData) - Machu Picchu (
MachuPicchuData) - Taj Mahal (
TajMahalData) - Christ the Redeemer (
ChristRedeemerData) - Pyramids of Giza (
PyramidsGizaData)
getData()
Retrieves theWonderData object for a specific wonder type.
value- TheWonderTypeenum value identifying the wonder
WonderData object
Throws: Exception if the wonder type is not found
Example:
WonderType Enum
TheWonderType enum identifies each of the seven wonders:
WonderData Structure
Each wonder’s data includes:- Basic Info: Title, subtitle, region
- Historical Data: Start year, construction timeline
- Content: Description, history, construction details
- Media: Image paths, video URLs
- Artifacts: Associated collectibles and artifact culture
- Location: Geographic coordinates, map information
- Events: Historical events related to the wonder
Usage Examples
Accessing Wonder Data
Retrieving Specific Wonder Data
Using Timeline Ranges
Filtering and Searching
Registration
TheWondersLogic instance is registered as a singleton using GetIt:
Initialization Flow
TheWondersLogic initialization is part of the app’s bootstrap process:
Related Classes
WonderData- Base class containing wonder informationWonderType- Enum identifying each wonderTimelineLogic- Uses wonder data for timeline eventsCollectiblesLogic- Links collectibles to wonders- Individual wonder data classes:
ChichenItzaDataChristRedeemerDataColosseumDataGreatWallDataMachuPicchuDataPetraDataPyramidsGizaDataTajMahalData