DefaultDirectoryObjectViewModel
Default implementation of the DirectoryObjectViewModel interface.
This ViewModel provides the standard business logic for a directory object detail screen, transforming raw DirectoryObject data into UI-ready view-model. It handles formatting of addresses, distance calculations, etc.
Parameters
The source directory object containing all raw data.
Optional callback triggered when user requests to view detailed entrance information.
Optional callback function triggered when the height of the header component changes.
Optional callback triggered when the user requests to collapse the detail view.
Optional callback triggered when the user requests to expand the detail view.
Optional callback triggered when user requests to close/dismiss the detail view. Used for closing bottom sheets/dialogs.
The user's last known geo-coordinates, used for: - Calculating and formatting distance to the object - Determining relative location context If null, distance-related properties will be null/unavailable.
Properties
Indicates whether entrance or porch information is available and can be displayed.
List of ContactData items available for this directory object.
The type of entrances available for this directory object. Determines how entrance information should be displayed and what options are available.
Information about floors of this directory object.
Primary/main line of the full address.
Secondary line of the full address with additional location details.
The regular weekly schedule defining operating hours.
Total number of reviews submitted for this object.
Short address suitable for list items and compact displays.
Additional descriptive text that complements the main title.
The current operational status of the entity.
Functions
Maximizes the current view, typically expanding a bottom sheet or modal to a increase state.
Minimizes the current view, typically collapsing a bottom sheet or modal to a reduced state.
Updates the current height of the header component.
Displays the detailed entrances/porches selection UI.