SERVICES
AstroApiService 14 methods astro_api_service.dart
Service for communicating with AstroMatrix API Now fully uses NetworkService for consistency.
Uses Models
Methods
fetchCityLocations()
Future<List<LocationSuggestion>>
Fetch city location suggestions from AstroMatrix or Google Places API. Summary: Retrieves a list of possible birth location suggestions matching the provided query string. Uses Google Places Autocomplete API when useGoogleAPI is true, otherwise uses AstroMatrix API.
Returns
Future<List<LocationSuggestion>> A Future that completes with a list of LocationSuggestion objects.
Returns: LocationSuggestion
API Endpoints
https://astromatrix.org/API/Utility/GetBirthLocationshttps://maps.googleapis.com/maps/api/place/autocomplete/json
Throws
- Exception when NetworkService returns a non-success result (result.success == false).
Side Effects
Performs network I/O via NetworkService.get.
_fetchCityLocationsFromAstroMatrix()
Future<List<LocationSuggestion>>
Fetch city locations from AstroMatrix API (default implementation)
_fetchCityLocationsFromGoogle()
Future<List<LocationSuggestion>>
Fetch city locations from Google Places Autocomplete API
useCache()
Future<Map<String, dynamic>>
Fetch detailed city information from AstroMatrix or Google Places Details API. Summary: Requests detailed metadata for a given town name (e.g., coordinates, timezone hints). Uses Google Places Details API when useGoogleAPI is true, otherwise uses AstroMatrix API.
Parameters
| Name | Type | Description |
|---|---|---|
town |
String | The town name to fetch details for (should be URL-encoded). |
useCache |
bool |
Returns
Future<Map<String, dynamic>> A Future that completes with the raw JSON map containing at least lat/lng.
API Endpoints
https://astromatrix.org/API/Utility/GetBirthCityInfohttps://maps.googleapis.com/maps/api/geocode/json
Throws
- Exception when NetworkService returns a non-success result (result.success == false).
Side Effects
Performs network I/O via NetworkService.get.
_fetchCityInfoFromAstroMatrix()
Future<Map<String, dynamic>>
Fetch city info from AstroMatrix API (default implementation)
_fetchCityInfoFromGoogle()
Future<Map<String, dynamic>>
Fetch city info from Google Geocoding API
Parameters
| Name | Type | Description |
|---|---|---|
town |
String |
fetchTimezone()
Future<Map<String, dynamic>>
Fetch timezone data from Google Timezone API or TimeZoneDB. Summary: Retrieves timezone information for a given geographic coordinate and timestamp. The implementation selects between Google Timezone API and TimeZoneDB based on the `useGoogleAPI` flag.
Returns
Future<Map<String, dynamic>> A Future that completes with the timezone details returned by the chosen service.
API Endpoints
https://maps.googleapis.com/maps/api/timezone/jsonhttps://vip.timezonedb.com/v2/get-time-zone
Throws
- Exception when NetworkService returns a non-success result (result.success == false).
Side Effects
Performs network I/O via NetworkService.get; constructs absolute URL strings.
fetchExtendedMoonInfo()
Future<Map<String, dynamic>>
Fetch extended moon information including phases, next events, and detailed reports. Summary: Retrieves comprehensive moon-related data including VOC, OOB, and next moon phases.
Returns
Future<Map<String, dynamic>> A Future that completes with the extended moon info.
API Endpoints
https://astromatrix.org/API/Astrology/GetExtendedMoonInfo
getPlanetPositions()
Future<List<Map<String, dynamic>>>
Get planet positions for ephemeris table (month view). Summary: Fetches daily planet positions for a given month and year. Returns positions for all planets (inner and outer) at midnight UTC for each day of the month.
Returns
Future<List<Map<String, dynamic>>> A Future that completes with a list of planet position objects.
API Endpoints
https://astromatrix.org/API/Astrology/GetPlanetPositions
Throws
- Exception when NetworkService returns a non-success result (result.success == false).
Side Effects
Performs network I/O via NetworkService.get.
calculateChart()
Future<Map<String, dynamic>>
Calculate chart positions by sending chart payload to the CalcPositions endpoint. Summary: Sends a ChartPayload to the astrology calculation endpoint and returns the computed chart data.
Parameters
| Name | Type | Description |
|---|---|---|
payload |
ChartPayload | ChartPayload model containing birth data and calculation options. It will be serialized via payload.toJson(). |
Returns
Future<Map<String, dynamic>> A Future that completes with computed chart positions, including planets, houses, and other computation results.
API Endpoints
https://astromatrix.org/API/Astrology/CalcPositions
Throws
- Exception when NetworkService returns a non-success result (result.success == false).
Side Effects
Performs network I/O via NetworkService.post; serializes payload via toJson().
reverseGeocode()
Future<String>
Reverse geocode coordinates to get formatted address/town name
Parameters
| Name | Type | Description |
|---|---|---|
lat |
double | |
lng |
double |
calculateHoroscopes()
Future<List<Map<String, dynamic>>>
Calculate horoscopes based on provided chart data. Summary: Sends computed chart data to the horoscope calculation endpoint to generate horoscope text/entries.
Returns
Future<Map<String, dynamic>> A Future that completes with horoscope data (sections, texts, localized strings).
API Endpoints
https://astromatrix.org/API/Astrology/CalculateHoroscopes
Throws
- Exception when NetworkService returns a non-success result (result.success == false).
Side Effects
Performs network I/O via NetworkService.post.
generateReport()
Future<Map<String, dynamic>>
Generate AI-based report for a given chart. Summary: Sends a chart payload and desired report type to the AI report endpoint and returns the generated report content.
Returns
Future<Map<String, dynamic>> A Future that completes with the AI-generated report data (likely includes sections, summary text, and metadata).
API Endpoints
https://club.astromatrix.org/ai/calculatereport
Throws
- Exception when NetworkService returns a non-success result (result.success == false).
Side Effects
Performs network I/O via NetworkService.post; may return large textual content.
dispose()
void
Dispose resources used by the AstroApiService. Summary: Placeholder for cleanup logic. Currently a no-op but provided for lifecycle parity.
Returns
void
Side Effects
Intended to release resources, cancel subscriptions, or dispose controllers if added in future.
Used By Services
- HoroscopeService.ensureInitialized() horoscope_service.dart
DeepLinkService 5 methods deep_link_service_stub.dart
Web stub for DeepLinkService - Deep linking handled differently on web Web uses standard URLs, no need for app-specific deep link handling
Methods
initialize()
Future<void>
Initialize deep link service (no-op on web)
isInitial()
Future<void>
Handle deep link (no-op on web)
Parameters
| Name | Type | Description |
|---|---|---|
url |
String | |
isInitial |
bool |
removeAffiliateCode()
Future<void>
Remove affiliate code
updateUserInfo()
void
Update user info
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String? | |
deviceInfoId |
String? |
dispose()
void
Dispose (no-op on web)
DeviceService 7 methods device_service_mobile.dart
Singleton service that provides device identifier, platform, and timezone information.
Methods
_instance()
factory
Returns the singleton instance of [DeviceService].
Returns
The shared [DeviceService] instance.
initialize()
Future<void>
Initialize device information by fetching the device ID and platform.
Returns
A [Future] that completes when initialization finishes.
Side Effects
Sets [_deviceId] and [_platform].
_getDeviceId()
Future<String?>
Determines and caches the device ID based on the current platform.
Returns
A [Future] that completes with the device ID or null.
Side Effects
Updates [_deviceId].
_getIosVendorId()
Future<String>
Retrieves the iOS vendor identifier using device_info_plus. Returns a fallback string on failure.
Returns
A [Future] resolving to the iOS vendor ID or a fallback message.
_getAndroidId()
Future<String>
Retrieves the Android ID using the android_id plugin. Returns a fallback string on failure.
Returns
A [Future] resolving to the Android ID or a fallback message.
_getPlatform()
String
Returns a normalized platform name for the current OS.
Returns
One of: "android", "ios", "fuchsia", "linux", "macos", "windows", or "unknown".
getTimezoneInfo()
Map<String, dynamic>
Returns timezone information containing the timezone name and offset in minutes. The `timeZoneOffset` value is the negated offset in minutes from UTC.
Returns
A map with keys 'timeZoneName' and 'timeZoneOffset' (int minutes).
DeviceService 5 methods device_service_stub.dart
Singleton service that provides device identifier, platform, and timezone information. WEB VERSION: Provides web-compatible implementations.
Methods
_instance()
factory
Returns the singleton instance of [DeviceService].
Returns
The shared [DeviceService] instance.
initialize()
Future<void>
Initialize device information by setting platform and generating device ID.
Returns
A [Future] that completes when initialization finishes.
Side Effects
Sets [_deviceId] and [_platform].
_getDeviceId()
String
Generates a web-compatible device identifier. Uses a simple random ID for web sessions.
Returns
A generated device ID string.
_getPlatform()
String
Returns "web" as the platform name.
Returns
The string "web".
getTimezoneInfo()
Map<String, dynamic>
Returns timezone information containing the timezone name and offset in minutes. The `timeZoneOffset` value is the negated offset in minutes from UTC.
Returns
A map with keys 'timeZoneName' and 'timeZoneOffset' (int minutes).
GoogleTranslateService 1 methods google_translate_service.dart
Service for calling the Google Translate API (gtx free endpoint)
Methods
isHtml()
static Future<String?>
Translates text from one language to another using Google's free 'gtx' endpoint. [text] The content to translate. [targetLanguage] The ISO-639-1 code for the target language (e.g., 'es', 'fr'). [isHtml] Placeholder for consistency; gtx automatically tries to preserve common tags.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | |
targetLanguage |
String | |
isHtml |
bool |
GPTBackend 6 methods gpt_service.dart
=============================================================== BACKEND PROVIDER INTERFACE ===============================================================
Uses Models
Uses Services
Methods
use()
static void
Allow backend override for testing or alternative implementations
Parameters
| Name | Type | Description |
|---|---|---|
backend |
GPTBackend |
prompt()
static Future<GPTResult>
Generate a completion from a simple text prompt
ask()
static Future<GPTResult>
Helper method for quick questions with default settings
Parameters
| Name | Type | Description |
|---|---|---|
question |
String |
temperature()
static Future<GPTResult>
Helper method for creative content generation
Parameters
| Name | Type | Description |
|---|---|---|
prompt |
String | |
temperature |
double |
analyze()
static Future<GPTResult>
Helper method for analytical/factual responses
Parameters
| Name | Type | Description |
|---|---|---|
prompt |
String |
translate()
static Future<GPTResult>
Translate text from one language to another If fromLanguage is null, auto-detects source language
Used By Services
- GPTBackend.use() gpt_service.dart
- RemoteGPTBackend.use() gpt_service.dart
- GPTService.use() gpt_service.dart
RemoteGPTBackend 6 methods gpt_service.dart
=============================================================== REMOTE BACKEND – calls Node.js GPT endpoint ===============================================================
Uses Models
Uses Services
Methods
use()
static void
Allow backend override for testing or alternative implementations
Parameters
| Name | Type | Description |
|---|---|---|
backend |
GPTBackend |
prompt()
static Future<GPTResult>
Generate a completion from a simple text prompt
ask()
static Future<GPTResult>
Helper method for quick questions with default settings
Parameters
| Name | Type | Description |
|---|---|---|
question |
String |
temperature()
static Future<GPTResult>
Helper method for creative content generation
Parameters
| Name | Type | Description |
|---|---|---|
prompt |
String | |
temperature |
double |
analyze()
static Future<GPTResult>
Helper method for analytical/factual responses
Parameters
| Name | Type | Description |
|---|---|---|
prompt |
String |
translate()
static Future<GPTResult>
Translate text from one language to another If fromLanguage is null, auto-detects source language
GPTService 6 methods gpt_service.dart
=============================================================== GPT SERVICE – Main service interface ===============================================================
Uses Models
Uses Services
Methods
use()
static void
Allow backend override for testing or alternative implementations
Parameters
| Name | Type | Description |
|---|---|---|
backend |
GPTBackend |
prompt()
static Future<GPTResult>
Generate a completion from a simple text prompt
ask()
static Future<GPTResult>
Helper method for quick questions with default settings
Parameters
| Name | Type | Description |
|---|---|---|
question |
String |
temperature()
static Future<GPTResult>
Helper method for creative content generation
Parameters
| Name | Type | Description |
|---|---|---|
prompt |
String | |
temperature |
double |
analyze()
static Future<GPTResult>
Helper method for analytical/factual responses
Parameters
| Name | Type | Description |
|---|---|---|
prompt |
String |
translate()
static Future<GPTResult>
Translate text from one language to another If fromLanguage is null, auto-detects source language
JsonStorageService 30 methods json_storage_service_mobile.dart
=============================================================== JSON STORAGE SERVICE - Generic local storage with invalidation ===============================================================
Fields
| Name | Type |
|---|---|
defaultExpiry |
Duration? |
Methods
file-level()
static int?
=============================================================== CACHE EXPIRY HELPERS ===============================================================
Parameters
| Name | Type | Description |
|---|---|---|
expiresIn |
Duration |
file-level()
static int?
Calculate expiry timestamp from duration Returns null if duration is null (no expiry)
Parameters
| Name | Type | Description |
|---|---|---|
expiresIn |
Duration |
_isExpired()
static bool
Check if a record is expired
Parameters
| Name | Type | Description |
|---|---|---|
expiresAt |
int? |
createRecordWithExpiry()
Future<void>
=============================================================== ADVANCED EXPIRY METHODS (for granular control) ===============================================================
createRecordWithExpiry()
Future<void>
Create record with specific expiry (bypasses defaultExpiry)
updateRecordAndRefreshExpiry()
Future<void>
Update record and refresh its expiry time
getRecords()
Future<List<Map<String, dynamic>>>
=============================================================== STANDARD CRUD METHODS ===============================================================
getRecords()
Future<List<Map<String, dynamic>>>
Get all records for a parent key
getRecord()
Future<Map<String, dynamic>?>
Get single record by ID
createRecord()
Future<void>
Create a new record Uses JsonStorageService.defaultExpiry for cache expiry (null = never expires)
updateRecord()
Future<void>
Update existing record Keeps existing expiry unless record is new/recreated
deleteRecord()
Future<void>
Delete record (soft delete - marks as deleted)
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String | |
recordId |
String |
invalidateParent()
Future<void>
=============================================================== INVALIDATION METHODS ===============================================================
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String | |
parentKey |
String |
invalidateParent()
Future<void>
Invalidate all records for a specific parent key Example: When user's birth data changes, invalidate all their charts
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String | |
parentKey |
String |
invalidateRecord()
Future<void>
Invalidate specific record by ID Example: Invalidate a single chart
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String | |
recordId |
String |
invalidateNamespace()
Future<void>
Invalidate all records in a namespace Use sparingly! Only for logout or complete refresh
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String |
invalidateOlderThan()
Future<void>
Invalidate records older than a certain age Example: Delete transits older than 30 days
invalidateExpired()
Future<int>
Invalidate (soft delete) expired records Returns the count of records invalidated
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String? |
getUnsyncedRecords()
Future<List<Map<String, dynamic>>>
=============================================================== SYNC METHODS ===============================================================
getUnsyncedRecords()
Future<List<Map<String, dynamic>>>
Get unsynced records for background sync
markSynced()
Future<void>
Mark record as synced (optionally replace local ID with server ID)
syncFromServer()
Future<void>
OPTIMIZED: Sync records from server using batch operations This prevents database locks by using transactions Uses JsonStorageService.defaultExpiry for cache expiry
cleanupSyncedDeletions()
Future<void>
=============================================================== CLEANUP METHODS ===============================================================
cleanupSyncedDeletions()
Future<void>
Hard delete synced deletions (cleanup after successful sync)
cleanupExpired()
Future<int>
Hard delete expired records (cleanup) Returns the count of records deleted
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String? |
clearNamespace()
Future<void>
Clear all records for a namespace (hard delete)
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String |
clearAll()
Future<void>
Clear all data (for testing or logout)
getStats()
Future<Map<String, dynamic>>
=============================================================== STATISTICS & DEBUGGING ===============================================================
getStats()
Future<Map<String, dynamic>>
Get statistics for debugging
_jsonEncodeTask()
String
Helper functions for compute()
Parameters
| Name | Type | Description |
|---|---|---|
data |
Map<String, dynamic> |
JsonStorageService 3 methods json_storage_service_stub.dart
=============================================================== JSON STORAGE SERVICE - WEB STUB (Using SharedPreferences) ===============================================================
Fields
| Name | Type |
|---|---|
defaultExpiry |
Duration? |
Methods
file-level()
static int?
=============================================================== CACHE EXPIRY HELPERS ===============================================================
Parameters
| Name | Type | Description |
|---|---|---|
expiresIn |
Duration |
_buildKey()
String
=============================================================== STANDARD CRUD METHODS ===============================================================
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String | |
recordId |
String |
count()
Future<int>
Deletes the oldest records in a namespace based on created_at timestamp
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
String? | |
count |
int |
LanguageService 32 methods language_service.dart
Singleton service that manages the app's current language, persists the preference, and loads remote translation tables for runtime lookups. **Caching Strategy:** - Remote table translations are cached in memory (_languageItems) and on disk (`lang_cache_*`) - GPT fallback translations are cached in memory (_gptTranslationCache) and on disk (`lang_gpt_cache_*`) - Remote cache is checked first; API is only called if cache is missing or stale (>7 days old) - getLang() never blocks on network; GPT runs in the background and results are persisted when received This service is reactive - widgets can listen to language changes using: 1. **ListenableBuilder** (recommended): ```dart ListenableBuilder( listenable: LanguageService(), builder: (context, child) => Text(getLang('Settings')), ) ``` 2. **ReactiveLanguage widget** (convenience wrapper): ```dart ReactiveLanguage( builder: (context) => Text(getLang('Settings')), ) ``` 3. **AnimatedBuilder**: ```dart AnimatedBuilder( animation: LanguageService(), builder: (context, child) => Text(getLang('Settings')), ) ``` **Important**: Use [ListenableBuilder] / [ReactiveLanguage] on [LanguageService] so the UI updates when the language changes **or** when GPT fills missing strings ([notifyListeners] runs after batch translation).
Fields
| Name | Type |
|---|---|
_gptCachePrefix |
const String |
_gptTranslationCache |
Map<String, Map<String, String>> |
_translatingKeys |
Map<String, Set<String>> |
_skipTranslationSet |
Set<String> |
debugTranslationLogToJson |
bool |
debugTranslationVerbose |
bool |
translationUpdated |
ValueNotifier<int> |
Methods
_instance()
factory
Returns the singleton instance of [LanguageService].
isTranslating()
bool
Checks if a specific string is currently being translated by GPT in the background.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String |
init()
Future<void>
Initializes the service by loading the saved language from persistent storage and ensuring the corresponding translation table is available.
Throws
- Never throws - all errors are caught and logged, service continues with defaults.
Side Effects
Reads from PreferenceService (which syncs with server) and may trigger network fetch.
setLanguage()
Future<void>
Sets the active language, persists it, and reloads the translation table.
Parameters
| Name | Type | Description |
|---|---|---|
language |
String | language code to switch to. |
Side Effects
Updates PreferenceService (which syncs to server/WebView), resets cached state, fetches translations from the network, and notifies all listeners to rebuild UI.
_ensureLanguageLoaded()
Future<void>
Ensures the translation table for the current language is loaded; no-op if already available.
Side Effects
May call [updateLanguageTable] which alters internal state. First checks local cache, only fetches from API if cache is missing or stale.
updateLanguageTable()
Future<void>
Fetches the language table for the current language from the remote API and caches it for synchronous lookups; does nothing for English.
Returns
Future that completes when the fetch and caching finish.
Side Effects
Updates internal cache [_languageItems] and [_downloadedLanguage], and persists to local storage for future use.
_loadFromCache()
Future<Map<String, String>?>
Loads translation table from local storage cache.
Returns
Map of translations or null if cache is missing/expired.
_saveToCache()
Future<void>
Saves translation table to local storage cache.
_loadGptCacheFromStorage()
Future<void>
Loads GPT fallback translations from disk into [_gptTranslationCache]. In-memory entries win over disk for the same key (session overrides).
Parameters
| Name | Type | Description |
|---|---|---|
language |
String |
_persistGptCacheForLanguage()
Future<void>
Persists the full GPT map for [language] so it survives app restarts.
Parameters
| Name | Type | Description |
|---|---|---|
language |
String |
clearCache()
Future<void>
Clears the cache for a specific language or all languages.
_loadSkipList()
Future<void>
Loads the skip list from persistent storage. Called during initialization to restore previously saved skip list.
_saveSkipList()
Future<void>
Saves the skip list to persistent storage. Called automatically whenever the skip list is modified.
_shouldSkipTranslation()
bool
Skips translation only for explicit user skip list, **emails**, and **date-like** strings. Everything else can use the remote table or GPT. Previously also skipped URLs, phones, numbers, Title Case words, etc.; that logic is commented near [_skipDatePatterns] for later reuse.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String |
_notifyGptTranslationsReady()
void
GPT cache updated; rebuild widgets that listen to [LanguageService].
addToSkipList()
Future<void>
Adds a string to the skip list so it will never be translated. Useful for names, proper nouns, or other content that should remain unchanged. The skip list is automatically persisted to storage.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String |
addToSkipListBatch()
Future<void>
Adds multiple strings to the skip list. The skip list is automatically persisted to storage.
Parameters
| Name | Type | Description |
|---|---|---|
texts |
List<String> |
removeFromSkipList()
Future<void>
Removes a string from the skip list. The skip list is automatically persisted to storage.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String |
clearSkipList()
Future<void>
Clears the entire skip list. The skip list is automatically persisted to storage.
getLang()
String
Looks up [name] in the remote language table, then GPT cache; if missing, queues a **debounced batch** GPT translation and returns [name] until ready. When GPT completes, [notifyListeners] runs so UI rebuilds. The synchronous part does not await the network; GPT runs in the background. [type] is reserved for future use.
Parameters
| Name | Type | Description |
|---|---|---|
name |
String |
_translateInBackground()
void
Triggers a background GPT translation without blocking. Uses debouncing and batching to optimize API calls.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String |
_processTranslationQueue()
Future<void>
Processes the translation queue by batching all pending strings into one API call. Respects rate limiting to prevent API overload.
_performBatchGPTTranslation()
Future<void>
Performs batch GPT translation for multiple strings in one API call. This is much more efficient than individual calls.
Parameters
| Name | Type | Description |
|---|---|---|
texts |
List<String> |
_createBatchTranslationPrompt()
String
Creates a batch translation prompt that GPT can process. Format: "Translate these English strings to [Language]. Return JSON format: {\"string1\": \"translation1\", \"string2\": \"translation2\"}"
_parseBatchTranslationResponse()
List<String?>
Parses the batch translation response from GPT. Expects JSON format: {"original": "translation", ...} Handles various response formats GPT might return.
_fallbackIndividualTranslations()
Future<void>
Fallback: Translate strings individually if batch fails. Only used as last resort.
_performBatchGoogleTranslate()
Future<void>
Performs a fast batch of individual Google Translate calls (for fallbacks).
Parameters
| Name | Type | Description |
|---|---|---|
texts |
List<String> |
clearGPTCache()
void
Clears the GPT translation cache for the current language
cancelPendingTranslations()
void
Cancels any pending translation requests and clears the queue. Useful when language changes to prevent stale translations.
_performGoogleTranslate()
Future<void>
Performs an isolated Google Translate call for large/HTML items.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | |
isHtml |
bool |
_fallbackToGpt()
Future<void>
Ultimate fallback to GPT for a specific string.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | |
targetLang |
String | |
langCode |
String |
getLang()
String
Global convenience that delegates to the singleton [LanguageService] for a synchronous translation lookup. Automatically triggers background GPT translation for missing keys.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | source text key to translate. |
Returns
translated text or original when not available (yet).
LoggingService 10 methods logging_service.dart
Service responsible for sending logs and metrics to the backend systems. This is a singleton logging layer for AstroMatrix that centralizes sending error/info/debug logs and metric events to configured backend endpoints.
Fields
| Name | Type |
|---|---|
_instance |
final LoggingService |
suppressTempPaymentLogs |
bool |
Uses Models
Uses Services
Methods
_instance()
factory
Factory that returns the singleton [LoggingService] instance.
Returns
The shared [LoggingService] singleton.
logError()
Future<void>
Sends an error or info log to the Node API or base API depending on `useNode`. Short summary: constructs a payload with uid, message, info, platform and timestamp and POSTs it to the logging endpoint.
Returns
Future<void> Completes when the network request finishes.
Throws
- May throw exceptions from [NetworkService.post] or JSON encoding operations.
Side Effects
Performs network I/O and may print debug logs.
logInfo()
Future<void>
Convenience helper that logs an informational message. Calls [logError] with "INFO: " prefixed to the message.
Returns
Future<void> Completes after delegating to [logError].
Throws
- Same exceptions as [logError]
Side Effects
Performs network I/O via [logError].
logDebug()
void
Prints a debug-only message to the console when in debug mode. Short summary: outputs a debug-only message using `debugPrint` when `kDebugMode` is true. Does not perform network I/O.
Parameters
| Name | Type | Description |
|---|---|---|
message |
String | The debug message to print |
Returns
void
Side Effects
Prints to console via `debugPrint` when `kDebugMode` is enabled.
logAdError()
static Future<void>
Static helper to log ad-specific errors under the 'ads' user/category.
Parameters
| Name | Type | Description |
|---|---|---|
message |
String | The ad-related error message to send |
data |
Map<String, dynamic>? | Optional map of additional contextual data to include |
Returns
Future<void> Completes when the log has been posted.
Throws
- Exceptions from underlying [logError] / [NetworkService.post]
Side Effects
Network I/O via [logError].
logAdInfo()
static Future<void>
Static helper to log ad-specific informational messages under the 'ads' category.
Parameters
| Name | Type | Description |
|---|---|---|
message |
String | The ad-related informational message |
data |
Map<String, dynamic>? | Optional contextual data to include |
Returns
Future<void> Completes when the log has been posted.
Throws
- Exceptions from underlying [logInfo] / [NetworkService.post]
Side Effects
Network I/O via [logInfo].
logAdDebug()
static void
Debug-only ad logging that prints JSON-encoded data when in debug mode.
Parameters
| Name | Type | Description |
|---|---|---|
message |
String | The debug message to print |
data |
Map<String, dynamic>? | Optional map of contextual data that will be JSON-encoded for printing |
Returns
void
Side Effects
Prints to console via `debugPrint` when `kDebugMode` is enabled.
logEvent()
Future<void>
Logs a metric event with name, type, value, and optional labels to the metrics endpoint. Short summary: builds an event payload and POSTs it to the metrics update endpoint.
Returns
Future<void> Completes after the network request finishes.
Throws
- May throw exceptions from [NetworkService.post] or encoding operations.
Side Effects
Performs network I/O and may print debug logs.
logCounter()
Future<void>
Convenience method for logging counter metrics (delegates to [logEvent]).
Returns
Future<void> Completes after delegating to [logEvent].
Throws
- Exceptions from [logEvent]
Side Effects
Network I/O via [logEvent].
logGauge()
Future<void>
Convenience method for logging gauge metrics (delegates to [logEvent]).
Returns
Future<void> Completes after delegating to [logEvent].
Throws
- Exceptions from [logEvent]
Side Effects
Network I/O via [logEvent].
Used By Services
- LoggingService logging_service.dart
- AdsService ads_service.dart
PayloadService 13 methods payload_service.dart
Service responsible for building chart payloads from various data sources. Centralizes all payload construction logic that was previously scattered across HoroscopeService. Converts user profiles, forms, and dates into properly formatted ChartPayload objects for API calls. This is a stateless utility service - all methods are static.
Uses Models
Methods
_getHouseSystemName()
static String
Get house system display name from code
Parameters
| Name | Type | Description |
|---|---|---|
code |
String |
buildFromUser()
static ChartPayload
Build payload from UserProfile(s) for self or relationship charts Parameters: - user1: Primary user (required) - prefs: Chart calculation preferences (house system, orbs, etc.) - chartType: Type of chart ('self', 'relationship', 'birthchart', etc.) - user2: Secondary user for relationship charts (optional) - transitDate: Date for transit calculations (optional) - transitLocation: Location for transit calculations (optional) - relocationLat, relocationLng, relocationTown: For relocation charts (optional) Returns: ChartPayload ready for API submission
_buildRelocationDate2()
static ChartDate
Build date2 for relocation charts: location-only (lat, lng, town). The API uses date1 for birth moment (planets) and date2 for relocation location (houses/angles).
buildFromForm()
static ChartPayload
Build payload from BirthForm for chart creation/preview Used when creating a new user or previewing a chart from form data before saving the user profile. Parameters: - form: Birth form data (name, date, time) - location: Birth location data - prefs: Chart calculation preferences - transitDate: Optional transit date - transitLocation: Optional transit location Returns: ChartPayload ready for API submission
buildCurrentPlanets()
static ChartPayload
Build payload for current planets (no birth data required) Shows current planetary positions without reference to a birth chart. Parameters: - prefs: Chart calculation preferences - date: Date/time for planet positions (defaults to now) - location: Location for calculations (optional) Returns: ChartPayload for current planets
userToChartDate()
static ChartDate
Convert UserProfile to ChartDate format for API payload Extracts all necessary birth data from user profile and formats it according to API requirements. Uses web-compatible format for fullDateStr. Optional location overrides allow changing location without modifying the user profile (useful for relocation charts).
_userToChartDateForDate2()
static ChartDate
Convert UserProfile to ChartDate format for date2 (minimal fields like web) Web's date2 doesn't include: type, timeHour, timeMinute, timePM, dst, mainUser, selectedTown
Parameters
| Name | Type | Description |
|---|---|---|
user |
UserProfile |
_buildFullDateStr()
static String
Build fullDateStr in web-compatible format Format: "January 11th 2000 5:00 PM" (note: double space before year)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int | |
day |
int | |
year |
int | |
time |
String |
_formToChartDate()
static ChartDate
Convert BirthForm + Location to ChartDate format for API payload Parses form data (YYYY-MM-DD date format, various time formats) and combines with location data to create complete ChartDate.
buildTransitDate()
static ChartDate
Build transit date ChartDate from DateTime and optional Location Used for transit charts, current planets, progressed charts, etc. Uses 24-hour time format for transit dates.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
location |
Location |
_buildFullDateStrForTransit()
static String
Build fullDateStr for transit date in web-compatible format Format: "December 24th 2025 12:09" (note: double space before year, 24h time)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int | |
day |
int | |
year |
int | |
time |
String |
_getTypeName()
static String
Get human-readable type name for chart type
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String |
_getPath()
static String
Get API path for chart type
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String |
ChartPreferences 13 methods payload_service.dart
Holds chart calculation preferences loaded from PreferenceService. The orb value is pre-selected based on chart type. This is a simple data class used by PayloadService to configure chart calculations (house system, sidereal mode, orbs, etc.)
Uses Models
Methods
_getHouseSystemName()
static String
Get house system display name from code
Parameters
| Name | Type | Description |
|---|---|---|
code |
String |
buildFromUser()
static ChartPayload
Build payload from UserProfile(s) for self or relationship charts Parameters: - user1: Primary user (required) - prefs: Chart calculation preferences (house system, orbs, etc.) - chartType: Type of chart ('self', 'relationship', 'birthchart', etc.) - user2: Secondary user for relationship charts (optional) - transitDate: Date for transit calculations (optional) - transitLocation: Location for transit calculations (optional) - relocationLat, relocationLng, relocationTown: For relocation charts (optional) Returns: ChartPayload ready for API submission
_buildRelocationDate2()
static ChartDate
Build date2 for relocation charts: location-only (lat, lng, town). The API uses date1 for birth moment (planets) and date2 for relocation location (houses/angles).
buildFromForm()
static ChartPayload
Build payload from BirthForm for chart creation/preview Used when creating a new user or previewing a chart from form data before saving the user profile. Parameters: - form: Birth form data (name, date, time) - location: Birth location data - prefs: Chart calculation preferences - transitDate: Optional transit date - transitLocation: Optional transit location Returns: ChartPayload ready for API submission
buildCurrentPlanets()
static ChartPayload
Build payload for current planets (no birth data required) Shows current planetary positions without reference to a birth chart. Parameters: - prefs: Chart calculation preferences - date: Date/time for planet positions (defaults to now) - location: Location for calculations (optional) Returns: ChartPayload for current planets
userToChartDate()
static ChartDate
Convert UserProfile to ChartDate format for API payload Extracts all necessary birth data from user profile and formats it according to API requirements. Uses web-compatible format for fullDateStr. Optional location overrides allow changing location without modifying the user profile (useful for relocation charts).
_userToChartDateForDate2()
static ChartDate
Convert UserProfile to ChartDate format for date2 (minimal fields like web) Web's date2 doesn't include: type, timeHour, timeMinute, timePM, dst, mainUser, selectedTown
Parameters
| Name | Type | Description |
|---|---|---|
user |
UserProfile |
_buildFullDateStr()
static String
Build fullDateStr in web-compatible format Format: "January 11th 2000 5:00 PM" (note: double space before year)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int | |
day |
int | |
year |
int | |
time |
String |
_formToChartDate()
static ChartDate
Convert BirthForm + Location to ChartDate format for API payload Parses form data (YYYY-MM-DD date format, various time formats) and combines with location data to create complete ChartDate.
buildTransitDate()
static ChartDate
Build transit date ChartDate from DateTime and optional Location Used for transit charts, current planets, progressed charts, etc. Uses 24-hour time format for transit dates.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
location |
Location |
_buildFullDateStrForTransit()
static String
Build fullDateStr for transit date in web-compatible format Format: "December 24th 2025 12:09" (note: double space before year, 24h time)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int | |
day |
int | |
year |
int | |
time |
String |
_getTypeName()
static String
Get human-readable type name for chart type
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String |
_getPath()
static String
Get API path for chart type
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String |
Used By Services
- HoroscopeService._loadPreferences() horoscope_service.dart
PreferenceService 19 methods preferences_service.dart
=============================================================== PREFERENCE SYNC SERVICE - FIXED WITH TYPE NORMALIZATION ===============================================================
Methods
file-level()
static String?
Get the active user's profile ID. Uses HoroscopeService.user1 (currently selected user) if available, falls back to the main user's profileID from storage.
initializeDefaults()
static Future<void>
Initialize all preferences with defaults on first app start
_upsertPreferences()
static Future<void>
Upsert preferences (merge incoming with existing)
setPreferenceLanguage()
static Future<void>
Set preference that works even when not logged in (mainly for language)
setPreferenceForAllUsers()
static Future<void>
Device-level or UI preference: always writes [StorageService]; when logged in, merges into the profile prefs record (same as [setPreferenceLanguage]).
setPreference()
static Future<void>
Save preference locally and sync to server
_syncToWebView()
static Future<void>
Sync preference to WebView
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
value |
dynamic |
_notifyListeners()
static void
Notify listeners that a preference changed Replaces aggressive cache invalidation
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
_invalidateCacheIfNeeded()
static Future<void>
Invalidate chart cache if preference affects chart calculations DEPRECATED: Now handled via preferenceChanges stream and constraint-based keys
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
getSyncablePreferences()
static Future<Map<String, dynamic>>
Get all preferences for current user
_getAllPreferences()
static Future<Map<String, dynamic>>
Get all preferences for current user
deletePreference()
static Future<void>
Delete a specific preference
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
syncFromServer()
static Future<void>
Sync from server FIXED: Uses ApiResult properties
syncUnsynced()
static Future<void>
Force sync unsynced preferences to server
setPreferences()
static Future<void>
Bulk update multiple preferences
clearAllPreferences()
static Future<void>
Clear all preferences for current user
exportPreferencesAsJson()
static Future<String>
Export all preferences as JSON
importPreferencesFromJson()
static Future<void>
Import preferences from JSON
Parameters
| Name | Type | Description |
|---|---|---|
json |
String |
_normalizeToType()
static dynamic
Normalize raw value to expected type Handles legacy cases where server has "true", "6.0", "1" as strings
Parameters
| Name | Type | Description |
|---|---|---|
raw |
dynamic | |
t |
Type |
SocketService 5 methods socket_service.dart
Provides a Socket.IO client connection to the backend and helpers to send and receive chat-related events.
Methods
initSocket()
void
Initializes and connects the socket to the server and registers the given user.
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String | The identifier for the current user that will be sent to the server. |
Side Effects
Opens a network connection, sets up connect/disconnect/error handlers, and emits a register event.
sendMessage()
void
Emits a `new_message` event with the provided payload to the server.
Parameters
| Name | Type | Description |
|---|---|---|
message |
Map<String, dynamic> | The message payload to send. |
Side Effects
Sends a network event to the socket server.
onMessageReceived()
void
Registers a callback for incoming `message_received` events from the server.
offMessageReceived()
void
Removes a previously registered `message_received` callback.
dispose()
void
Disconnects the socket and releases network resources.
Side Effects
Closes the socket connection.
StorageService 0 methods storage_service_mobile.dart
====================================================================== STORAGE SERVICE (SINGLETON) ======================================================================
Methods
StorageService 0 methods storage_service_stub.dart
====================================================================== STORAGE SERVICE (SINGLETON) - WEB VERSION ======================================================================
Methods
AdRotationService 2 methods ad_rotation_service.dart
Service that manages the rotation between in-house ads and AdMob ads. It uses a percentage-based approach to decide which ad to show.
Methods
setInHouseAdPercentage()
void
Sets the in-house ad percentage for current session only.
Parameters
| Name | Type | Description |
|---|---|---|
percentage |
int |
shouldShowInHouseAd()
bool
Returns true if an in-house ad should be shown based on the rotation percentage. Always returns true on Web (no AdMob support). Always returns false if ads are disabled (user subscribed).
AdsService 24 methods ads_service.dart
Singleton service that manages loading, displaying, retry logic, and error logging for ads.
Fields
| Name | Type |
|---|---|
_loggingService |
LoggingService |
maxRetries |
const int |
retryDelay |
const Duration |
Uses Models
Uses Services
Methods
_instance()
factory
Factory constructor returning the singleton AdsService instance.
getPagesPerAd()
int
Returns how many pages should pass between interstitial ads for the given session count. Returns 0 if no tier applies (session count below all thresholds → no page-based ads).
Parameters
| Name | Type | Description |
|---|---|---|
sessionCount |
int |
setInterstitialInterval()
void
Updates the minimum interval between interstitial ads (legacy setter, kept for compatibility).
Parameters
| Name | Type | Description |
|---|---|---|
minutes |
int |
initialize()
Future<void>
Initialize the ads service This should be called before any ads are displayed. For paid users, ads are disabled immediately without any flicker.
force()
Future<void>
Syncs ad configuration from the backend (intervals, reward toggles, session tiers).
Parameters
| Name | Type | Description |
|---|---|---|
force |
bool |
refreshAdStatus()
Future<bool>
Refreshes ad status based on comprehensive subscription info. Returns whether the user is paid; `false` on error (ads state unchanged except via [setAdsEnabled] failure paths).
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
_loadAdsState()
Future<void>
Load ads state from SharedPreferences
setForceHide()
void
Temporarily force hide or show ads (e.g., during splash screen).
Parameters
| Name | Type | Description |
|---|---|---|
value |
bool |
setAdsEnabled()
Future<void>
Enable or disable ads
Parameters
| Name | Type | Description |
|---|---|---|
enabled |
bool | Whether ads should be enabled; persists the choice. |
Side Effects
Updates persistence and disposes ads when disabling.
hideAds()
Future<void>
Hide all ads (called when user subscribes)
Side Effects
Disposes all ad objects, disables ads, and ungates content.
_disposeAllAds()
void
Dispose all ad objects
loadPersistentBannerAd()
Future<void>
Load persistent global banner ad
loadBannerAd()
Future<void>
Load and show banner ad (Legacy/Local)
Side Effects
Creates a BannerAd instance and updates internal state; may retry on failure.
loadAndShowInterstitialAd()
Future<void>
Load and show interstitial ad
Side Effects
Loads an interstitial and shows it immediately on success; retries on failure.
loadRewardedInterstitialAd()
Future<bool>
Load rewarded interstitial ad Returns true if an ad was successfully loaded and show was triggered.
showRewardedInterstitialAd()
Future<void>
Show rewarded interstitial ad
Side Effects
Displays the rewarded ad, handles full-screen callbacks, and grants reward callbacks.
shouldShowAd()
bool
Check if ads should be shown based on web app request
Parameters
| Name | Type | Description |
|---|---|---|
webAppRequest |
bool |
Returns
true if the caller requested an ad and ads are enabled.
updateUserInfo()
void
Update user info
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String? | Optional user identifier for logging. |
deviceInfoId |
String? | Optional device identifier for logging. |
handleLoadAdError()
Future<void>
Log error to server
handleLoadAdError()
Future<void>
Handle load ad error
Side Effects
Sends a JSON-encoded error payload to the logging service.
handleShowAdError()
Future<void>
Handle show ad error
Side Effects
Sends a JSON-encoded error payload to the logging service.
recordAdSeen()
Future<void>
Records an ad being successfully shown. Labeled by adType ('interstitial', 'rewarded_interstitial', etc.). Increments local/DB user session statistics under the 'ads_seen' key.
Parameters
| Name | Type | Description |
|---|---|---|
adType |
String |
dispose()
void
Dispose all resources
Side Effects
Disposes current ad instances and clears callback references.
AnalyticsService 5 methods analytics_service.dart
Service that provides helpers for logging events to Firebase Analytics.
Methods
logScreenView()
Future<void>
Logs a screen view safely.
Parameters
| Name | Type | Description |
|---|---|---|
screenName |
required String |
logMainUserMissing()
Future<void>
Logs when main user (profileID) is missing but users exist
logMainUserInvalid()
Future<void>
Logs when main user (profileID) is invalid (doesn't match any user)
logMainUserAutoSet()
Future<void>
Logs when main user is successfully auto-set
logMainUserValidation()
Future<void>
Logs main user validation check results
AppReviewService 7 methods app_review_service.dart
Service to manage app review prompts with session-based logic Logic: - Shows after 3 sessions, 1 minute after app start - "Remind me later" resets counter, shows again after 3 more sessions - "Already reviewed" never shows again - Disabled on Flutter web Testing: - Set `forceShowForTesting = true` to bypass all conditions
Fields
| Name | Type |
|---|---|
forceShowForTesting |
bool |
Methods
incrementSessionCount()
Future<void>
Call this on app start to increment session count
shouldShowReviewPrompt()
Future<bool>
Check if we should show the review prompt Returns true if conditions are met
scheduleReviewPrompt()
Future<void>
Schedule the review prompt to show after delay
handleRateNow()
Future<void>
User chose to rate now - open the store
handleRemindLater()
Future<void>
User chose "Remind me later" - reset counter
handleAlreadyReviewed()
Future<void>
User chose "Already reviewed" - never show again
resetReviewState()
Future<void>
Reset all review state (for testing)
Used By Widgets
- MyApp main.dart
AppVersionMetricService 1 methods app_version_metric_service.dart
Reports the running app version to the Grafana metrics pipeline. The version is read at runtime from the build (which is generated from `pubspec.yaml`'s `version:` field) via [PackageInfo], so it works for both web and mobile builds without hardcoding. Uniqueness: we only emit the counter once per install per version. A flag is persisted in [StorageService] (SharedPreferences / localStorage), so the same user re-opening the app does not produce additional counts. The counter is only re-sent when the app is updated to a new version on that device.
Fields
| Name | Type |
|---|---|
metricName |
const String |
_loggedVersionKey |
const String |
Methods
logOnce()
static Future<void>
Emits the app-version metric at most once per install per build. Safe to call on every startup — it is a no-op if the current build was already reported on this device. Failures are swallowed so startup is never blocked by metrics. The counter re-fires on every version OR build bump, so each distinct release on a device is counted exactly once.
BirthValidationService 5 methods birth_validation_service.dart
Service for validating birth information and orchestrating chart calculations.
Uses Models
Methods
validateBirthInfo()
Future<BirthValidationResult>
Validates birth information by calculating a chart and extracting the Big Three. Uses ChartService.calculatePositionsForForm() which doesn't require a UserProfile.
Returns
A [BirthValidationResult] containing success state and extracted data or an error message.
Returns: BirthValidationResult
isFormComplete()
bool
Quickly checks whether the provided form and location appear complete for submission.
validateBirthDate()
bool
Validates an ISO-8601 date string for birth date constraints.
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String |
validateBirthTime()
bool
Validates a time string in HH:mm format.
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String |
validateForm()
bool
Validates the overall birth form for required fields.
Parameters
| Name | Type | Description |
|---|---|---|
form |
BirthForm |
CategoryItemsService 4 methods category_items_service.dart
Service for fetching category items Generic service used by tarot, houses, and other category-based views
Uses Models
Uses Services
Methods
useCache()
Future<List<CategoryItem>>
Get items for a category Used by ItemCategoryCtrl equivalent in Flutter Now with 14-day caching for improved performance
Parameters
| Name | Type | Description |
|---|---|---|
category |
String | |
useCache |
bool |
_getFromCache()
Future<List<CategoryItem>?>
Get items from cache
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
_addToCache()
Future<void>
Add items to cache with 14-day expiry
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
items |
CategoryItem |
clearCache()
Future<void>
Clear all cached category items
CategoryItem 4 methods category_items_service.dart
Category item model
Uses Models
Uses Services
Methods
useCache()
Future<List<CategoryItem>>
Get items for a category Used by ItemCategoryCtrl equivalent in Flutter Now with 14-day caching for improved performance
Parameters
| Name | Type | Description |
|---|---|---|
category |
String | |
useCache |
bool |
_getFromCache()
Future<List<CategoryItem>?>
Get items from cache
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
_addToCache()
Future<void>
Add items to cache with 14-day expiry
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
items |
CategoryItem |
clearCache()
Future<void>
Clear all cached category items
Used By Services
- CategoryItemsService.useCache() category_items_service.dart
- CategoryItemsService._getFromCache() category_items_service.dart
- CategoryItemsService._addToCache() category_items_service.dart
- CategoryItem.useCache() category_items_service.dart
- CategoryItem._getFromCache() category_items_service.dart
- CategoryItem._addToCache() category_items_service.dart
ChartRenderingService 6 methods chart_rendering_service.dart
Persistent chart rendering service
Uses Models
Methods
initialize()
static Future<void>
Initialize once on app start
renderChart()
static Future<Uint8List>
Render a single chart
renderPatterns()
static Future<Map<int, Uint8List>>
Render multiple pattern charts
_buildPatternConfig()
static ChartRenderConfig
Build pattern config - MATCHES NORMAL CHARTS
_buildPatternData()
static Map<String, dynamic>
Build pattern astro data
Parameters
| Name | Type | Description |
|---|---|---|
formation |
Map<String, dynamic> |
_generateDefaultHouses()
static List<Map<String, dynamic>>
Generate default houses
ChartService 31 methods chart_service.dart
Service for transforming raw chart data into display-ready format. This is a PURE transformation layer - no calculations, no API calls. Just takes ChartResult and formats it for widgets.
Fields
| Name | Type |
|---|---|
horizontalAsteroids |
List<String> get |
asteroidNames |
Set<String> get |
verticalAsteroids |
List<String> get |
Uses Models
Methods
getChartTypeLabel()
static String
Get display label for a chart type Uses the displayName getter from ChartType enum
Parameters
| Name | Type | Description |
|---|---|---|
type |
ChartType |
getChartCategory()
static String
Single source of truth mapping layer that selects the correct category based on chart type, data context (itemType) and section. Moved from ChartScreen to ChartService to break the circular import between chart_screen.dart ↔ chart_widgets.dart which caused null-dereference crashes on web.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType | |
section |
String | |
itemType |
String |
buildRenderConfig()
static ChartRenderConfig
Build chart render config from chart type and screen size
getDisplayPlanets()
static List<Map<String, dynamic>>
Transform raw chart result into display-ready planet data [coordDisplayFormat] 'decimals' (e.g. 15.5°) or 'degrees_minutes' (e.g. 15°30')
getTransitPlanets()
static List<Map<String, dynamic>>
Transform transit planets with display data [coordDisplayFormat] 'decimals' or 'degrees_minutes'
getDisplayHouses()
static List<Map<String, dynamic>>
Transform houses with display data
Parameters
| Name | Type | Description |
|---|---|---|
result |
ChartResult |
_isSelfComparisonChart()
static bool
Build aspect grid for display (full matrix) Builds from transitData array to match Angular structure: planets[i].aspects[j] = { Aspect, Orb, Item } Single-wheel charts compare one set of bodies against itself, so the aspect grid is symmetric (planet vs the same planet set on both axes). Two-wheel charts (transit, synastry, composite, progressed, returns, relocation, draconic) compare two distinct sets: rows = natal bodies, columns = transit/comparison bodies. For those the grid must NOT be mirrored, otherwise both axes read as the same set.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType |
getAspectGrid10()
static List<List<Map<String, dynamic>>>
Get aspect grid for the main transit table using mainAspectRowIndices. Rows: Sun–Pluto, North Node, South Node, Ascendant, Midheaven (14 rows) Columns: Sun–Pluto (10 columns)
getAsteroidAspectGrid()
static List<List<Map<String, dynamic>>>
Get aspect grid for asteroids with specific horizontal/vertical layout Columns (horizontal): Asteroids only (Lilith through Psyche) Rows (vertical): All planets + asteroids (Sun through Psyche) This allows asteroid-to-planet aspects (e.g. Chiron conjunct Sun) to appear An aspect is placed if at least one of its planets is an asteroid
getHorizontalAsteroidPlanets()
static List<Map<String, dynamic>>
Get horizontal asteroid planets for grid columns
getVerticalAsteroidPlanets()
static List<Map<String, dynamic>>
Get vertical asteroid planets for grid rows. Respects showPlanet toggle — disabled bodies are excluded from rows.
getChartTitles()
static Map<String, String>
Get chart titles based on chart type
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType |
getChartTitlesWithUsers()
static Map<String, String>
Get chart titles with user names for synastry charts
shouldShowTransits()
static bool
Check if chart type should show transits
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType |
shouldShowHouses()
static bool
Check if chart type should show houses
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType |
shouldShowDeclinations()
static bool
Check if chart type should show declinations
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType |
needsSecondUser()
static bool
Check if chart type needs second user
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType |
calculateImageWidth()
static double
Calculate image width based on screen width
Parameters
| Name | Type | Description |
|---|---|---|
screenWidth |
double |
formatDeclination()
static String
Format declination for display
Parameters
| Name | Type | Description |
|---|---|---|
dec |
double |
formatOrdinal()
static String
Format house number as ordinal
Parameters
| Name | Type | Description |
|---|---|---|
num |
int |
getAspectColor()
static String
Get aspect color for display
Parameters
| Name | Type | Description |
|---|---|---|
aspect |
String |
getAspectSymbol()
static String
Get aspect symbol for display
Parameters
| Name | Type | Description |
|---|---|---|
aspect |
String |
parseColor()
static Color
Parse hex color string (#RRGGBB) or rgba string (rgba(r,g,b,a)) to Color
Parameters
| Name | Type | Description |
|---|---|---|
colorString |
String? |
getPlanetImageUrl()
static String
Get planet image URL
getSignImageUrl()
static String
Get sign image URL
getPatternFormations()
static List<AspectFormation>
Get aspect image URL
Parameters
| Name | Type | Description |
|---|---|---|
chartData |
ChartResult |
getPatternFormations()
static List<AspectFormation>
Get pattern formations as typed models
Parameters
| Name | Type | Description |
|---|---|---|
chartData |
ChartResult |
renderPatterns()
static Future<Map<int, Uint8List>>
Render all aspect patterns from chart data
hasPatterns()
static bool
Check if patterns exist
Parameters
| Name | Type | Description |
|---|---|---|
chartData |
ChartResult |
getPatternCount()
static int
Get pattern count
Parameters
| Name | Type | Description |
|---|---|---|
chartData |
ChartResult |
clearPatternCache()
static void
Clear pattern cache
CityService 2 methods city_service.dart
Loads and caches world cities (population > 30k). Format: array-of-arrays [[name, country, lat, lng, pop_thousands], ...] On web: parses synchronously on main thread (compute/isolates not supported). On mobile: uses compute() for background parsing.
Methods
_parseCitiesSync()
List<Map<String, dynamic>>
Synchronous parse -- used on web where isolates aren't available. Input format: [[name, country, lat, lng, pop_thousands], ...]
Parameters
| Name | Type | Description |
|---|---|---|
jsonStr |
String |
_parseCities()
List<Map<String, dynamic>>
Top-level function for compute() on native platforms.
Parameters
| Name | Type | Description |
|---|---|---|
jsonStr |
String |
_MemoryCacheEntry 12 methods component_service.dart
In-memory cache entry with pre-parsed traits
Uses Models
Methods
openComponentView()
static void
Open component view - handles everything Central method for opening component screen from anywhere in the app. Creates MatrixItem and navigates to ComponentScreen. If you have a full MatrixItem with dates/metadata, pass it via [matrixItem]. Otherwise, a minimal MatrixItem will be created from [componentName] and [category]. For transit components, this will attempt to look up the full data from cache. Example: ```dart ComponentService.openComponentView( context, componentName: 'Sun', category: 'Zodiac Planets', ); ```
_findTransitInCache()
static Future<MatrixItem?>
Find a transit item in the horoscope cache by component name and category
Parameters
| Name | Type | Description |
|---|---|---|
componentName |
String | |
category |
String |
findItemByName()
static Future<MatrixItem?>
Find a matrix item in the current (main) user's horoscope cache by component name, searching across ALL categories. This is the "look the notification title up in the calculateHoroscopes result" lookup used by notification routing: the title is the source of truth and the matched item's `facet`/`category` drive the destination. Returns null when the title isn't present in the computed matrix for the current user (caller treats that as `notification_item_not_found`).
findForecastItemByName()
static Future<MatrixItem?>
Find a forecast item (moon phases, lunations, events, etc.) by name across the given [types], using the SAME `ForecastService.fetchForecastData` lists the moon/calendar screens render and tap. The returned [MatrixItem] carries the correct `eventId` and `Category` (e.g. "Forecasts") so ComponentSummary loads the right component — a minimal item would send `Id=undefined` and the wrong category.
findVocOobItem()
static Future<MatrixItem?>
Find a Void-of-Course or Out-of-Bounds event by notification title and build the same MatrixItem the moon screen taps open (VOC → "Void of Course", OOB → "Transit Out of Bounds"). Keyword-gated so it only runs for actual VOC/OOB notifications.
Parameters
| Name | Type | Description |
|---|---|---|
name |
String |
createMatrixItem()
static MatrixItem
Create a MatrixItem for navigation to ComponentScreen Helper method to create properly formatted MatrixItem objects for use with ComponentScreen navigation. Example: ```dart final item = ComponentService.createMatrixItem( componentName: 'Sun', category: 'Zodiac Planets', ); Navigator.push( context, MaterialPageRoute( builder: (context) => ComponentScreen(matrixItem: item), ), ); ```
clearCache()
static Future<void>
Clear both in-memory and disk caches
getItem()
Future<ComponentResult>
Get component data with automatic traits parsing ✅ Returns both component data AND parsed traits in a single call ✅ Delegates to TarotService for tarot-related categories
file-level()
ComponentTraits?
Parse traits from GetComponent API response ✅ Automatically called by getItem()
Parameters
| Name | Type | Description |
|---|---|---|
componentData |
Map<String, dynamic>? |
_transformTraitsResponse()
Map<String, dynamic>
Transform flat array API response into grouped structure ✅ FULLY DYNAMIC - automatically handles ANY trait category from API ✅ No hardcoded categories - add new categories in database without code changes
Parameters
| Name | Type | Description |
|---|---|---|
apiData |
dynamic |
getImageUrl()
String
Get image URL for component ✅ Delegates to ComponentImageHelper for unified image handling Supports both standard components and tarot cards
Parameters
| Name | Type | Description |
|---|---|---|
imagePath |
String | |
category |
String? | |
componentName |
String? |
ComponentService 12 methods component_service.dart
Service for fetching component data and traits
Uses Models
Methods
openComponentView()
static void
Open component view - handles everything Central method for opening component screen from anywhere in the app. Creates MatrixItem and navigates to ComponentScreen. If you have a full MatrixItem with dates/metadata, pass it via [matrixItem]. Otherwise, a minimal MatrixItem will be created from [componentName] and [category]. For transit components, this will attempt to look up the full data from cache. Example: ```dart ComponentService.openComponentView( context, componentName: 'Sun', category: 'Zodiac Planets', ); ```
_findTransitInCache()
static Future<MatrixItem?>
Find a transit item in the horoscope cache by component name and category
Parameters
| Name | Type | Description |
|---|---|---|
componentName |
String | |
category |
String |
findItemByName()
static Future<MatrixItem?>
Find a matrix item in the current (main) user's horoscope cache by component name, searching across ALL categories. This is the "look the notification title up in the calculateHoroscopes result" lookup used by notification routing: the title is the source of truth and the matched item's `facet`/`category` drive the destination. Returns null when the title isn't present in the computed matrix for the current user (caller treats that as `notification_item_not_found`).
findForecastItemByName()
static Future<MatrixItem?>
Find a forecast item (moon phases, lunations, events, etc.) by name across the given [types], using the SAME `ForecastService.fetchForecastData` lists the moon/calendar screens render and tap. The returned [MatrixItem] carries the correct `eventId` and `Category` (e.g. "Forecasts") so ComponentSummary loads the right component — a minimal item would send `Id=undefined` and the wrong category.
findVocOobItem()
static Future<MatrixItem?>
Find a Void-of-Course or Out-of-Bounds event by notification title and build the same MatrixItem the moon screen taps open (VOC → "Void of Course", OOB → "Transit Out of Bounds"). Keyword-gated so it only runs for actual VOC/OOB notifications.
Parameters
| Name | Type | Description |
|---|---|---|
name |
String |
createMatrixItem()
static MatrixItem
Create a MatrixItem for navigation to ComponentScreen Helper method to create properly formatted MatrixItem objects for use with ComponentScreen navigation. Example: ```dart final item = ComponentService.createMatrixItem( componentName: 'Sun', category: 'Zodiac Planets', ); Navigator.push( context, MaterialPageRoute( builder: (context) => ComponentScreen(matrixItem: item), ), ); ```
clearCache()
static Future<void>
Clear both in-memory and disk caches
getItem()
Future<ComponentResult>
Get component data with automatic traits parsing ✅ Returns both component data AND parsed traits in a single call ✅ Delegates to TarotService for tarot-related categories
file-level()
ComponentTraits?
Parse traits from GetComponent API response ✅ Automatically called by getItem()
Parameters
| Name | Type | Description |
|---|---|---|
componentData |
Map<String, dynamic>? |
_transformTraitsResponse()
Map<String, dynamic>
Transform flat array API response into grouped structure ✅ FULLY DYNAMIC - automatically handles ANY trait category from API ✅ No hardcoded categories - add new categories in database without code changes
Parameters
| Name | Type | Description |
|---|---|---|
apiData |
dynamic |
getImageUrl()
String
Get image URL for component ✅ Delegates to ComponentImageHelper for unified image handling Supports both standard components and tarot cards
Parameters
| Name | Type | Description |
|---|---|---|
imagePath |
String | |
category |
String? | |
componentName |
String? |
ContentGatingService 12 methods content_gating_service.dart
CONTENT GATING SERVICE ===================== Manages session-based content gating for component/content views. Free users are gated after viewing N components past their first session. USAGE: ------ To add gating to any screen, wrap your content with GatedContentWidget: ```dart import '../widgets/gated_content_widget.dart'; // In your build method: GatedContentWidget( checkGating: true, // Set false to disable gating for this screen recordView: true, // Set true if this counts as a "view" towards threshold onUngated: () { debugPrint('Content unlocked!'); }, child: YourActualContent(), ) ``` PARAMETERS: - checkGating: Enable/disable gating checks. Set false for screens that should never gate. - recordView: Whether this screen view counts toward the gating threshold. Set true for content screens (ComponentScreen, etc.) Set false for navigation/browsing screens - onUngated: Callback when content is unlocked (after ad or purchase) - onGated: Callback when gating is triggered RULES: - First session: no gating - After first session: gate every N component views (N = progressive based on sessions) - When gated: user must watch ad or upgrade to continue - View counter resets when ad is watched - Paid users are never gated PROGRESSIVE TIGHTENING (see content_gating_config.dart): - After 1 session: gate every 10 views - After 4 sessions: gate every 7 views - After 10 sessions: gate every 5 views INITIALIZATION: Called automatically in main.dart on app startup: - ContentGatingService().initialize() - ContentGatingService().incrementSession()
Fields
| Name | Type |
|---|---|
freeTierSaveLimit |
const int |
_categoryCharts |
const String |
Methods
incrementSession()
Future<void>
Increment session count - call on app launch (after first time). Resets view counter and gated state so each session starts fresh.
recordComponentView()
Future<bool>
Record a component view and check if content should be gated Returns true if content is now gated
checkIsGated()
Future<bool>
Check if content is currently gated (without recording a view)
ungateAfterAd()
Future<void>
Ungate content after watching an ad This resets the view counter for gating purposes
ungateAfterPurchase()
Future<void>
Ungate content permanently after purchase
forceRefresh()
Future<void>
Check if user is a paid user. Results are cached for [_paidStatusCacheDuration] to avoid hammering the IAP + backend on every save attempt.
Parameters
| Name | Type | Description |
|---|---|---|
forceRefresh |
bool |
refreshPaidStatus()
Future<void>
Refresh paid status (useful after login or purchase). Always busts the cache and re-fetches from IAP + backend.
_fetchSavedCountFromServer()
Future<int>
Fetch the live saved-entry count from the server. Uses `GET NODE_URL/journals/count?uid=<profileId>&category=<category>`. Falls back to the locally-cached count on any network error so the app continues to work offline.
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
checkAndIncrementSavedChart()
Future<bool>
Check the free-tier saved-charts limit against the **server** count. Returns `true` if the limit has been reached → caller should block the save and show the upgrade modal. Returns `false` when the save is allowed. Paid users always get `false` (no limit).
checkAndIncrementSavedReport()
Future<bool>
Check the free-tier saved-reports limit against the **server** count. Returns `true` if the limit has been reached → caller should block the save and show the upgrade modal. Returns `false` when the save is allowed. Paid users always get `false` (no limit).
resetGatingState()
Future<void>
Reset all gating state (for testing or user request)
getDebugInfo()
Map<String, dynamic>
Get debug info for logging
ForecastService 10 methods forecast_service.dart
Forecast service using shared top-level mapping functions
Uses Models
Methods
_filterMoonSignChanges()
List<MatrixItem>
Tab 1 – Moon Sign Changes: horoscopeType == 'MoonPhase' only. These are the frequent (every 2-3 day) sign transitions; no phrase.
Parameters
| Name | Type | Description |
|---|---|---|
items |
MatrixItem |
_filterLunations()
List<MatrixItem>
Tab 2 – Lunations: New Moon & Full Moon only (horoscopeType == 'MOON'). These have inspirational phrases and happen ~twice per month.
Parameters
| Name | Type | Description |
|---|---|---|
items |
MatrixItem |
_isLegacyShortTermForecast()
bool
Hash contains `short` (or component matches short-tier planets).
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem |
_isLegacyLongTermForecast()
bool
Hash contains `long`, or (when hash missing) not a short-tier forecast.
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem |
curatePersonalPlanetsForCalendar()
List<MatrixItem>
Collapsed Long Term calendar: yearly (current year), active outer-planet sign ingresses, and the next monthly horoscope.
personalPlanetsForCalendarExpanded()
List<MatrixItem>
Expanded Long Term calendar: all relevant rows, yearly pinned first then by begins.
_compareForecastsByEndingFirst()
static int
Soonest [MatrixItem.ends] first; rows without an end date go last.
Parameters
| Name | Type | Description |
|---|---|---|
a |
MatrixItem | |
b |
MatrixItem |
_isRetrogradeForecastRow()
bool
Legacy HoroscopeService horoscopeFilter: Name == "Retrograde".
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem |
_filterRetrogradeActive()
List<MatrixItem>
Legacy EventsCtrl RetrogradeList: ongoing retrogrades (TimeAway contains "Ends").
Parameters
| Name | Type | Description |
|---|---|---|
items |
MatrixItem |
_filterRetrogradeForYear()
List<MatrixItem>
Legacy Calendars Retrograde tab: Name == Retrograde, full current-year list.
GlassUiTransparencyService 2 methods glass_ui_transparency_service.dart
Persists the Profile → Appearance glass **transparency** slider (0–1, center = default).
Methods
init()
Future<void>
Load from local [StorageService] first (guest-safe), then optional profile prefs.
setSlider01()
Future<void>
**Auto-saves** on every change (slider [onChanged]). No separate Apply button. Works for guests (local only) and signed-in users (local + merged profile prefs).
Parameters
| Name | Type | Description |
|---|---|---|
value |
double |
GlossaryService 5 methods glossary_service.dart
Service for fetching glossary terms and help content
Uses Models
Uses Services
Methods
useCache()
Future<List<GlossaryTerm>>
Get glossary terms Endpoint: /help/get?type=Glossary Now with 14-day caching for improved performance
Parameters
| Name | Type | Description |
|---|---|---|
useCache |
bool |
_getFromCache()
Future<List<GlossaryTerm>?>
Get terms from cache
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
_addToCache()
Future<void>
Add terms to cache with 14-day expiry
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
terms |
GlossaryTerm |
clearCache()
Future<void>
Clear cached glossary terms
searchItems()
Future<List<SearchResult>>
Search horoscope items Endpoint: /API/Astrology/GetHoroscopeItems?search={query}
Parameters
| Name | Type | Description |
|---|---|---|
query |
String |
GlossaryTerm 5 methods glossary_service.dart
Glossary term model
Uses Models
Uses Services
Methods
useCache()
Future<List<GlossaryTerm>>
Get glossary terms Endpoint: /help/get?type=Glossary Now with 14-day caching for improved performance
Parameters
| Name | Type | Description |
|---|---|---|
useCache |
bool |
_getFromCache()
Future<List<GlossaryTerm>?>
Get terms from cache
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
_addToCache()
Future<void>
Add terms to cache with 14-day expiry
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
terms |
GlossaryTerm |
clearCache()
Future<void>
Clear cached glossary terms
searchItems()
Future<List<SearchResult>>
Search horoscope items Endpoint: /API/Astrology/GetHoroscopeItems?search={query}
Parameters
| Name | Type | Description |
|---|---|---|
query |
String |
Used By Services
- GlossaryService.useCache() glossary_service.dart
- GlossaryService._getFromCache() glossary_service.dart
- GlossaryService._addToCache() glossary_service.dart
- GlossaryTerm.useCache() glossary_service.dart
- GlossaryTerm._getFromCache() glossary_service.dart
- GlossaryTerm._addToCache() glossary_service.dart
HarmonizerBackend 0 methods harmonizer_service.dart
=============================================================== BACKEND PROVIDER INTERFACE ===============================================================
Methods
RemoteHarmonizerBackend 0 methods harmonizer_service.dart
=============================================================== REMOTE BACKEND ===============================================================
Methods
HarmonizerService 0 methods harmonizer_service.dart
=============================================================== HARMONIZER SERVICE ===============================================================
Methods
HelpService 6 methods help_service.dart
Service for fetching help content
Uses Models
Methods
getHelp()
Future<HelpData?>
Show help for a specific page/section/type Endpoint: /help/get?page={page}§ion={section}&type={type} Now with 14-day caching for improved performance
_getFromCache()
Future<HelpData?>
Get help from cache
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
_addToCache()
Future<void>
Add help to cache with 14-day expiry
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
helpData |
HelpData |
clearCache()
Future<void>
Clear cached help data
show()
static Future<void>
Plug-and-play helper for showing help anywhere in the app
_showFallback()
static void
Graceful fallback required by the card
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
HoroscopeService 56 methods horoscope_service.dart
Service for calculating astrological charts. This is a SINGLETON service - the core infrastructure of the app. Call HoroscopeService.ensureInitialized() in main() before runApp(). Access via HoroscopeService.instance everywhere else. Maintains calculation context (users, transit date) and provides methods to calculate positions and horoscopes with caching. Pulls chart preferences (house system, sidereal, orbs) from PreferenceService.
Fields
| Name | Type |
|---|---|
transitDateRefreshInterval |
const Duration |
_storageCleanupInterval |
const Duration |
Uses Models
Uses Services
Methods
ensureInitialized()
static Future<HoroscopeService>
Initialize the service singleton. Safe to call multiple times - only initializes once. Call this early in main() before runApp().
Parameters
| Name | Type | Description |
|---|---|---|
api |
AstroApiService |
clearTestPreferences()
void
Clears temporary preference override used by test or scoped views.
_initialize()
Future<void>
Internal initialization - loads previously saved users and starts transit date refresh timer.
_restoreUser1Id()
Future<String?>
Restore user1 ID from local storage first, then PreferenceService. Critical for web refresh to preserve last selected user.
_restoreUser2Id()
Future<String?>
Restore user2 ID from local storage first, then PreferenceService.
_persistUser1()
Future<void>
Persist user1 ID to preferences and local storage.
_persistUser2()
Future<void>
Persist user2 ID to preferences and local storage.
_loadDefaultUser()
Future<void>
Load the default user as user1 when no user1 is set. Falls back to: main user (profileID) -> first available user
resetToMainUser()
Future<void>
Resets user1 to the main user (profileID). Called on cold start and every time the app resumes from background. Falls back to the existing user if no main user is found.
ensureUser1Loaded()
Future<bool>
Ensure user1 is loaded before accessing charts/reports. If no user1 is set, loads the default user (main user or first available). Returns true if user1 is available after this call.
getEffectiveTimezoneOffsetMinutes()
int
Get the effective timezone offset in minutes. 1. If a location is set in currentLocation → use that location's timeOffset 2. If no location is set → fallback to the device's system timezone
persist()
Future<void>
Set primary user for calculations. [persist]: when false, only memory is updated (e.g. shared chart deep link in [ChartScreen]); saved `chart_service_user1_id` is unchanged.
Parameters
| Name | Type | Description |
|---|---|---|
user |
UserProfile | |
persist |
bool |
persist()
Future<void>
Set secondary user for relationship calculations. [persist]: when false, only memory is updated (shared chart / ephemeral UI).
Parameters
| Name | Type | Description |
|---|---|---|
user |
UserProfile | |
persist |
bool |
restoreChartUsersFromPreferences()
Future<void>
Reload user1/user2 from saved preference IDs into memory only. Used after an ephemeral share session (prefs were never updated with the synthetic `shared_u1_*` id). If the saved user1 id is missing or stale, falls back to [_loadDefaultUser].
replaceUsersInMemory()
void
Replace chart users in memory only (no writes to user id preferences). Used when exiting or pausing an ephemeral shared-chart session from a synchronous route callback.
Parameters
| Name | Type | Description |
|---|---|---|
user1 |
UserProfile | |
user2 |
UserProfile |
startEphemeralSession()
void
Starts an ephemeral session if one isn't already active, snapshotting the real user profiles first.
Parameters
| Name | Type | Description |
|---|---|---|
user1 |
UserProfile | |
user2 |
UserProfile |
finalizeEphemeralSession()
Future<void>
Restores the real profiles from snapshot (or preferences) if active, and resets ephemeral state.
setTransitDate()
void
Set transit date for transit calculations. NOTE: Does NOT clear caches - date is part of cache key, so different dates use different cache entries. This allows bidirectional navigation (forward/back) to reuse cached data.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_runStorageCleanup()
Future<void>
Need to review cleanup changes
checkAndResetIfStale()
bool
Checks if the transit date is "stale" (hasn't been refreshed in 2+ hours). If stale, resets the viewed context to 'now' and returns true. This is typically called when the app resumes from the background.
clearUser2()
Future<void>
Clear secondary user.
clearAllUsers()
Future<void>
Clear both users (useful for logout scenarios).
_loadPreferences()
Future<ChartPreferences>
Load chart calculation preferences from PreferenceService.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String? | determines which orb to use: - 'transit' or 'transits' → horoscopeOrb - 'relationship' or 'synastry' → relationshipOrb - 'self', 'birth', or default → orb |
calculatePositions()
Future<ChartResult>
Calculate chart positions (planets, houses, aspects). Uses current user1 and optionally user2/transitDate. For relocation charts, pass relocationLat/relocationLng/relocationTown. Results are cached by user ID, date, AND all calculation constraints. This allows instant switching between configurations without cache invalidation.
prefetchTransitDates()
Future<void>
Warm the positions cache for a set of transit dates in the background. This does NOT change the current [_transitDate] or emit any stream events — it only populates the memory/disk caches so that subsequent forward/back navigation to those dates resolves instantly from cache instead of hitting the network. Runs sequentially, skips dates already cached, and silently swallows errors (prefetch is best-effort). Re-entrant calls are ignored while a prefetch batch is already running.
calculatePositionsForForm()
Future<ChartResult>
Calculate positions directly from BirthForm and Location. Used for birth validation before a UserProfile is created. Does not use or affect internal state (user1/user2). Results are NOT cached (no user ID to cache against).
getEphemerisData()
Future<EphemerisData>
Get ephemeris data (planet positions for a month)
calculateHoroscopes()
Future<ChartResult>
Calculate horoscopes with interpretations.
_fetchHoroscopes()
Future<ChartResult>
Internal method to fetch horoscopes from API Extracted to allow request deduplication
file-level()
Map<String, dynamic>?
Synchronously retrieve horoscope data from memory cache if available. Matches by user ID and type (e.g. 'self', 'relationship').
Parameters
| Name | Type | Description |
|---|---|---|
type |
String |
file-level()
Map<String, dynamic>?
Synchronously retrieve chart positions from memory cache if available.
Parameters
| Name | Type | Description |
|---|---|---|
type |
String |
chartType()
ExtendedMoonInfo?
Synchronously retrieve extended moon info.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String |
chartType()
PlanetHourInfo?
Synchronously retrieve planet hour info.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String |
chartType()
LifePath?
Synchronously retrieve life path.
Parameters
| Name | Type | Description |
|---|---|---|
fromChart |
ChartType | |
chartType |
String |
file-level()
Planet?
Synchronously retrieve specific planet.
file-level()
Planet?
Synchronously find a planet from the in-memory POSITIONS cache (calcPositions). Companion to [getPlanetSync], which reads the horoscope cache. Some screens (e.g. the chart screen) populate the positions cache but not the horoscope cache, so callers that need a planet's current sign/degree regardless of which screen loaded the data should try both. The positions payload is stored under `positions_<self|relationship>_...` (NOT `positions_transit`) and contains two arrays: `planets` (natal) and `transitPlanets` (current transit). For a transit lookup we read `transitPlanets`; for a birth lookup we read `planets`. Returns null when no positions payload is loaded or the planet isn't present.
invalidateUser()
Future<void>
Invalidate all cached data for a user. Call this when user's birth data changes.
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
daysOld()
Future<void>
Invalidate old transit data.
Parameters
| Name | Type | Description |
|---|---|---|
daysOld |
int |
_buildCacheKeyAsync()
Future<String>
Build cache key from current state and calculation constraints. The cache key includes ALL calculation-affecting constraints so that: - Users can switch instantly between house systems, sidereal/tropical, etc. - Each configuration has its own cached result - We never need to invalidate cache on constraint change (new key = new entry)
_buildCacheKey()
Future<String>
Synchronous cache key builder (uses cached constraints if available) Falls back to simple key if constraints not loaded yet
Parameters
| Name | Type | Description |
|---|---|---|
type |
String |
file-level()
Map<String, dynamic>?
Build ChartPayload from current state. Build ChartPayload from current state.
file-level()
Map<String, dynamic>?
Find a chart by its type from the charts list Searches for a chart matching the target type by checking type fields. Returns null if chart not found.
file-level()
Map<String, dynamic>?
Get chart by type or fall back to index Tries to find chart by type first, falls back to index if not found.
getLifePath()
Future<LifePath?>
Get LifePath numerology data Parameters: - fromChart: Which chart to get LifePath from - ChartType.birth: Permanent birth life path (default) - ChartType.transit: Daily number (birth + transit date)
chartType()
BigThree?
Get Big Three (Sun, Moon, Ascendant) from birth chart (synchronous, memory-only) Returns BigThree with Placement objects for sun, moon, and ascendant Returns null if any of the three are missing or not in memory cache
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
String |
getBigThree()
Future<BigThree?>
Get Big Three (Sun, Moon, Ascendant) from birth chart (async, may call API) Returns BigThree with Placement objects for sun, moon, and ascendant Returns null if any of the three are missing WARNING: This method calls calculateHoroscopes API if data not cached. Prefer using getBigThreeSync() or user.bigThree when possible.
getExtendedMoonInfo()
Future<ExtendedMoonInfo?>
Get extended moon information (always from transit/daily chart)
useCache()
Future<ExtendedMoonInfo?>
Get extended moon information from the dedicated API.
Parameters
| Name | Type | Description |
|---|---|---|
useCache |
bool |
useCache()
Future<MoonInfo?>
Get moon phase information using the dedicated Moon Phase API. Results are cached until app restart.
Parameters
| Name | Type | Description |
|---|---|---|
useCache |
bool |
getPlanetHourInfo()
Future<PlanetHourInfo?>
Get planetary hours data (always from transit/daily chart)
getChakras()
Future<List<Chakra>?>
Get chakra balance data
getPlanets()
Future<List<Planet>?>
Get all planets Parameters: - fromChart: Which chart type to get planets from - ChartType.birth: Natal planet positions - ChartType.transit: Current planet positions with transit houses (default)
getPlanet()
Future<Planet?>
Get specific planet by name
getMayanData()
Future<MayanData?>
Get Mayan astrology data (always from birth chart)
getProfection()
Future<Profection?>
Get profection data (from transit chart)
getPsychologyShort()
Future<PsychologyShort?>
Get psychology analysis (short version)
Used By Services
- HoroscopeService.ensureInitialized() horoscope_service.dart
InHouseAdsService 5 methods inhouse_ads_service.dart
Singleton service that manages advertisements display, fetching, and tracking across the app. Each widget gets a fresh random ad when created. In-house ads are also hidden for paid users, matching the behavior of Google Mobile Ads via AdsService.
Methods
file-level()
Map<String, dynamic>?
Returns a random active in-house ad. All active ads from every tag (ItemContent, Link, Tarot, Promo, etc.) are pooled together so every ad gets equal random exposure. The [type] parameter is accepted for API compatibility but is ignored — use [getPromoText], [getItemContentAd], or [getTarotAd] for targeted pulls. Returns null if user is subscribed (paid) or no ads are loaded yet.
Parameters
| Name | Type | Description |
|---|---|---|
type |
String |
file-level()
Map<String, dynamic>?
Returns a random item content ad (uses the dedicated ItemContent endpoint) Returns null if user is subscribed (paid).
file-level()
Map<String, dynamic>?
Returns a random tarot ad Returns null if user is subscribed (paid).
file-level()
String?
Returns the first active promo text string. Returns null if user is subscribed (paid).
getAllAds()
List<Map<String, dynamic>>
Returns ALL active in-house ads as a list (used for purchases/list views). The [type] parameter is kept for compatibility but all active ads are returned. Returns empty list if user is subscribed (paid).
Parameters
| Name | Type | Description |
|---|---|---|
type |
String |
IntegrationService 7 methods integration_service_mobile.dart
Centralized integration utilities for remote configuration, splash data, and in-app purchase interactions with backend services.
Uses Models
Methods
fetchLiveServer()
static Future<Map<String, dynamic>>
Fetches the live server configuration from the node endpoint, compares it with stored configuration and optionally saves or navigates based on device/SDK constraints and detected changes.
Returns
A map containing 'webUrl', 'value', and 'hasChanged' (and 'error' on failure).
Side Effects
May update SharedPreferences, call SystemNavigator.pop, launch external URL, and invoke the provided onNavigate callback.
_getSavedLiveServerData()
static Future<LiveServerData?>
Loads the last saved LiveServerData from SharedPreferences if present.
_saveLiveServerData()
static Future<void>
Persists the given LiveServerData to SharedPreferences as JSON.
Parameters
| Name | Type | Description |
|---|---|---|
data |
LiveServerData | LiveServerData instance to save. |
Side Effects
Writes 'last_live_server' key to SharedPreferences.
fetchSplashInfoBeforeApp()
static Future<Map<String, String?>>
Retrieves the daily splash image and quote from the API and stores them in SharedPreferences and global variables for immediate use before app bootstrapping.
Returns
A map with 'quote' and 'bgImage' (fallback values on error).
Side Effects
Updates SharedPreferences and global variables `im` and `quote` imported from main.dart.
validatePurchaseWithServer()
static Future<Map<String, dynamic>?>
Validates an in-app purchase receipt with the backend and logs the validation steps; returns the backend response map on success.
Returns
Server response map when validation status indicates success, otherwise null.
Side Effects
Writes logs via LoggingService.
postPaymentInfo()
static Future<bool>
Sends purchase information to the backend, optionally including affiliate details, and logs execution traces for debugging.
Returns
true when the backend acknowledges success, false otherwise.
Side Effects
Emits multiple logs via LoggingService and performs a network POST to record the payment.
getVerifiedAffiliateCodes()
static Future<List<String>>
Fetches a list of verified affiliate codes from the backend and returns an empty list on error or unexpected response formats.
Returns
A List<String> of affiliate codes or an empty list on failure.
IntegrationService 5 methods integration_service_stub.dart
Web stub for IntegrationService - Platform integration utilities
Methods
fetchLiveServer()
static Future<Map<String, dynamic>>
Fetch live server configuration (web-safe version)
fetchSplashInfoBeforeApp()
static Future<Map<String, String?>>
Fetch splash info (web-safe version)
validatePurchaseWithServer()
static Future<Map<String, dynamic>?>
Validate purchase with server (not available on web)
postPaymentInfo()
static Future<bool>
Post payment info (not available on web)
syncPayments()
static Future<Map<String, dynamic>?>
Sync payments (web-safe version)
LocationService 12 methods location_service.dart
Unified service for all location operations: GPS, permissions, and birth location search
Fields
| Name | Type |
|---|---|
_searchDebounceDuration |
const |
Uses Models
Methods
checkLocationServiceEnable()
Future<bool>
Check if location service is enabled
checkLocationPermissionEnable()
Future<bool>
Check and request location permissions
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
getCurrentGPS()
Future<Position?>
Get current GPS coordinates without needing a web controller
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
getCurrentLocation()
Future<Map<String, double>?>
Get current GPS coordinates (legacy version with web controller evaluation)
handleLocationRequest()
Future<Map<String, double>?>
Complete location flow: check service, permissions, get location
getCurrentPosition()
Future<Position?>
Get current GPS position (just coordinates, no WebView). Returns null if permission is denied; throws [PermissionDeniedException] so callers can show a browser-settings message instead of a generic error.
reverseGeocode()
Future<String>
Reverse geocode coordinates to get town name
Parameters
| Name | Type | Description |
|---|---|---|
lat |
double | |
lng |
double |
searchLocationsDebounced()
void
Search for locations with debouncing
searchLocations()
Future<List<LocationSuggestion>>
Search for locations (no debouncing)
selectFromSuggestion()
Future<Location>
Select location from suggestion
selectLocation()
Future<Location>
Select location and get full details with timezone
cancelPendingSearches()
void
Cancel pending searches
LoginBackend 1 methods login_service.dart
=============================================================== BACKEND PROVIDER INTERFACE ===============================================================
Methods
parseChangePasswordResponse()
ApiResult
Maps ChangePassword API JSON (`success`, `message`, `data`) to [ApiResult].
Parameters
| Name | Type | Description |
|---|---|---|
apiResponse |
Map<String, dynamic> |
RemoteLoginBackend 1 methods login_service.dart
=============================================================== REMOTE BACKEND — your existing logic ===============================================================
Methods
parseChangePasswordResponse()
ApiResult
Maps ChangePassword API JSON (`success`, `message`, `data`) to [ApiResult].
Parameters
| Name | Type | Description |
|---|---|---|
apiResponse |
Map<String, dynamic> |
LoginService 1 methods login_service.dart
=============================================================== LOGIN SERVICE — same API, with optional provider override ===============================================================
Methods
parseChangePasswordResponse()
ApiResult
Maps ChangePassword API JSON (`success`, `message`, `data`) to [ApiResult].
Parameters
| Name | Type | Description |
|---|---|---|
apiResponse |
Map<String, dynamic> |
ForgotPasswordService 1 methods login_service.dart
=============================================================== FORGOT PASSWORD SERVICE — same pattern ===============================================================
Methods
parseChangePasswordResponse()
ApiResult
Maps ChangePassword API JSON (`success`, `message`, `data`) to [ApiResult].
Parameters
| Name | Type | Description |
|---|---|---|
apiResponse |
Map<String, dynamic> |
MatrixReportService 2 methods matrix_report_service.dart
Service for generating HTML reports from Matrix data. Groups MatrixItem objects by their facet and generates a premium HTML document containing all detailed interpretations.
Fields
| Name | Type |
|---|---|
lastReportItems |
List<MatrixItem>? |
lastReportCache |
String? |
Uses Models
Methods
setupNativeReport()
static void
Setup data for a native report
generateHtmlReport()
static String
Generate HTML report for matrix items (public method)
MessageService 10 methods message_service.dart
Service for managing messaging functionality
Uses Models
Methods
getUserConversations()
static Future<List<Conversation>>
Get all conversations for the current user
isSupport()
static Future<List<Message>>
Get messages between two users
Parameters
| Name | Type | Description |
|---|---|---|
fromUserId |
String | |
toUserId |
String | |
isSupport |
bool |
validateUserEmail()
static Future<String>
Validate/approve a user by email
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
_getCurrentUserId()
static Future<String>
Get current user ID from storage
formatMessageTime()
static String
Format timestamp for display
Parameters
| Name | Type | Description |
|---|---|---|
timestamp |
DateTime |
sendMessage()
static Future<List<Message>>
Send a message and return list of messages to add to UI For support: calls HTTP endpoint and returns [userMessage, autoResponse] For regular: emits via socket and returns [userMessage]
createConversation()
static Conversation
Helper: Navigate directly to a conversation with any user For support: userId = 'support@astromatrix.org' For regular users: userId = their actual ID
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String | |
userName |
String |
initSocket()
static Future<void>
Initializes the socket connection and sets up the badge increment listener. Called when the user enters the support/messages screen.
checkUnreadBadge()
static Future<void>
Checks for unread messages on startup and sets the badge count. Lightweight REST call — no socket connection needed.
disposeSocket()
static void
Disposes the socket connection when the user exits the support screen.
MetricsService 15 methods metrics_service.dart
Service for reporting metrics and tracking online users
Fields
| Name | Type |
|---|---|
_metricQueue |
List<Map<String, dynamic>> |
Methods
sendGauge()
Future<bool>
Send a gauge metric (sets absolute value)
sendCounter()
Future<bool>
Send a counter metric (increments by value)
pingOnline()
Future<int?>
Ping the server to mark user as online Endpoint: POST /events/metrics/pingonline [uid] - User ID to mark as active Returns the total number of active users
Parameters
| Name | Type | Description |
|---|---|---|
uid |
String |
getUsersOnline()
Future<int?>
Get current count of users online Endpoint: GET /events/metrics/usersonline Returns the number of active users
trackMeditationStart()
static Future<void>
Track meditation session start
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
trackMeditationComplete()
static Future<void>
Track meditation session completion
trackApiError()
static Future<void>
Track API errors
Parameters
| Name | Type | Description |
|---|---|---|
endpoint |
String | |
errorType |
String |
trackFeatureUsage()
static Future<void>
Track feature usage
Parameters
| Name | Type | Description |
|---|---|---|
featureName |
String |
trackTarotTrait()
static Future<void>
Track tarot trait fetching
Parameters
| Name | Type | Description |
|---|---|---|
cardName |
String | |
category |
String |
file-level()
String?
Helper to get the screen name from a route
Parameters
| Name | Type | Description |
|---|---|---|
route |
Route |
_startTimer()
void
Start timer for a screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
_stopTimer()
Future<void>
Stop timer for a specific screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
complete()
Future<void>
Mark the reading as completed and send metrics
cancel()
Future<void>
Mark the reading as canceled / incomplete
_sendMetrics()
Future<void>
Calculate duration and send metrics
TarotReadingSession 15 methods metrics_service.dart
/ =============================================================== TAROT READING TRACKER WITH TIMER ===============================================================
Fields
| Name | Type |
|---|---|
_metricQueue |
List<Map<String, dynamic>> |
Methods
sendGauge()
Future<bool>
Send a gauge metric (sets absolute value)
sendCounter()
Future<bool>
Send a counter metric (increments by value)
pingOnline()
Future<int?>
Ping the server to mark user as online Endpoint: POST /events/metrics/pingonline [uid] - User ID to mark as active Returns the total number of active users
Parameters
| Name | Type | Description |
|---|---|---|
uid |
String |
getUsersOnline()
Future<int?>
Get current count of users online Endpoint: GET /events/metrics/usersonline Returns the number of active users
trackMeditationStart()
static Future<void>
Track meditation session start
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
trackMeditationComplete()
static Future<void>
Track meditation session completion
trackApiError()
static Future<void>
Track API errors
Parameters
| Name | Type | Description |
|---|---|---|
endpoint |
String | |
errorType |
String |
trackFeatureUsage()
static Future<void>
Track feature usage
Parameters
| Name | Type | Description |
|---|---|---|
featureName |
String |
trackTarotTrait()
static Future<void>
Track tarot trait fetching
Parameters
| Name | Type | Description |
|---|---|---|
cardName |
String | |
category |
String |
file-level()
String?
Helper to get the screen name from a route
Parameters
| Name | Type | Description |
|---|---|---|
route |
Route |
_startTimer()
void
Start timer for a screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
_stopTimer()
Future<void>
Stop timer for a specific screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
complete()
Future<void>
Mark the reading as completed and send metrics
cancel()
Future<void>
Mark the reading as canceled / incomplete
_sendMetrics()
Future<void>
Calculate duration and send metrics
MetricsErrorTracker 15 methods metrics_service.dart
=============================================================== ERROR TRACKING ===============================================================
Fields
| Name | Type |
|---|---|
_metricQueue |
List<Map<String, dynamic>> |
Methods
sendGauge()
Future<bool>
Send a gauge metric (sets absolute value)
sendCounter()
Future<bool>
Send a counter metric (increments by value)
pingOnline()
Future<int?>
Ping the server to mark user as online Endpoint: POST /events/metrics/pingonline [uid] - User ID to mark as active Returns the total number of active users
Parameters
| Name | Type | Description |
|---|---|---|
uid |
String |
getUsersOnline()
Future<int?>
Get current count of users online Endpoint: GET /events/metrics/usersonline Returns the number of active users
trackMeditationStart()
static Future<void>
Track meditation session start
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
trackMeditationComplete()
static Future<void>
Track meditation session completion
trackApiError()
static Future<void>
Track API errors
Parameters
| Name | Type | Description |
|---|---|---|
endpoint |
String | |
errorType |
String |
trackFeatureUsage()
static Future<void>
Track feature usage
Parameters
| Name | Type | Description |
|---|---|---|
featureName |
String |
trackTarotTrait()
static Future<void>
Track tarot trait fetching
Parameters
| Name | Type | Description |
|---|---|---|
cardName |
String | |
category |
String |
file-level()
String?
Helper to get the screen name from a route
Parameters
| Name | Type | Description |
|---|---|---|
route |
Route |
_startTimer()
void
Start timer for a screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
_stopTimer()
Future<void>
Stop timer for a specific screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
complete()
Future<void>
Mark the reading as completed and send metrics
cancel()
Future<void>
Mark the reading as canceled / incomplete
_sendMetrics()
Future<void>
Calculate duration and send metrics
MoonService 11 methods moon_service.dart
Service for fetching and managing moon phase data This service wraps HoroscopeService.getExtendedMoonInfo() and provides convenience methods for accessing moon data with proper caching.
Methods
getExtendedMoonInfo()
Future<ExtendedMoonInfo?>
Get extended moon information Fetches current moon phase, next moon events, VOC/OOB status, etc. Data comes from the transit chart in HoroscopeService. Returns null if data unavailable or on error.
getCurrentMoonInfo()
Future<MoonInfo?>
Get just the current moon phase info
getNextMoonEvent()
Future<NextMoonEvent?>
Get next moon phase event
getNextLunarEvent()
Future<NextLunarEvent?>
Get next lunar event (eclipse, etc)
isVoidOfCourse()
bool
Check if moon is currently void of course
Parameters
| Name | Type | Description |
|---|---|---|
moonInfo |
ExtendedMoonInfo |
isOutOfBounds()
bool
Check if moon is currently out of bounds
Parameters
| Name | Type | Description |
|---|---|---|
moonInfo |
ExtendedMoonInfo |
getMoonWidth()
double
Calculate moon width based on perigee percentage (matching AngularJS logic)
Parameters
| Name | Type | Description |
|---|---|---|
percentPerigee |
double? |
isSuperMoon()
bool
Determine if this is a Super Moon (>90% perigee)
Parameters
| Name | Type | Description |
|---|---|---|
percentPerigee |
double? |
isMicroMoon()
bool
Determine if this is a Micro Moon (<10% perigee)
Parameters
| Name | Type | Description |
|---|---|---|
percentPerigee |
double? |
file-level()
String?
Get moon special type (Super/Micro/null)
Parameters
| Name | Type | Description |
|---|---|---|
percentPerigee |
double? |
buildFullMoonString()
String
Build full moon string like "Full Moon in Aries"
Parameters
| Name | Type | Description |
|---|---|---|
moonInfo |
MoonInfo |
ProductConfigService 18 methods product_config_service.dart
Service to load and manage product configuration from JSON This allows adding new products by simply updating the JSON file without requiring code changes or app updates.
Uses Models
Methods
loadConfig()
Future<void>
Load product configuration from app_assets
_buildLookupMaps()
void
Build lookup maps for O(1) access
_loadFallbackConfig()
void
Fallback to hardcoded config if JSON loading fails
getAllProductIds()
Set<String>
Get all product IDs that should be fetched from store
file-level()
ProductConfig?
Get product configuration by ID
Parameters
| Name | Type | Description |
|---|---|---|
productId |
String |
file-level()
String?
Get discount product ID for a regular product
Parameters
| Name | Type | Description |
|---|---|---|
regularProductId |
String |
hasDiscountVersion()
bool
Check if a product has a discount version
Parameters
| Name | Type | Description |
|---|---|---|
productId |
String |
excludeDiscounts()
List<ProductConfig>
Get all active products (non-legacy) [excludeDiscounts] - if true, excludes discount products from the list
Parameters
| Name | Type | Description |
|---|---|---|
excludeDiscounts |
bool |
getRegularProducts()
List<ProductConfig>
Get only regular (non-discount) products
getProductsSortedByOrder()
List<ProductConfig>
Get products sorted by display order
getProductsByType()
List<ProductConfig>
Get products filtered by type
Parameters
| Name | Type | Description |
|---|---|---|
type |
String |
getSubscriptionProducts()
List<ProductConfig>
Get subscription products only
getLifetimeProducts()
List<ProductConfig>
Get lifetime products only
getDiscountProducts()
List<ProductConfig>
Get discount products only
file-level()
IconData?
Convert icon name string to IconData
Parameters
| Name | Type | Description |
|---|---|---|
iconName |
String |
file-level()
SubscriptionProductConfig?
Convert ProductConfig to SubscriptionProductConfig (for compatibility)
Parameters
| Name | Type | Description |
|---|---|---|
config |
ProductConfig |
getDisplayOrder()
int
Get display order for a product ID
Parameters
| Name | Type | Description |
|---|---|---|
productId |
String |
reload()
Future<void>
Reload configuration (useful for testing or hot reload)
PurchaseService 32 methods purchase_service_mobile.dart
Singleton service that manages in-app purchases, product discovery, restoration, validation, logging, and post-purchase processing.
Fields
| Name | Type |
|---|---|
enableExcessiveLogging |
bool get |
_pendingPurchasesKey |
const String |
Methods
_instance()
factory
Factory constructor that returns the singleton instance.
initialize()
Future<void>
Initialize the purchase service and connect to the platform store.
_loadProcessedPurchaseIds()
Future<void>
Load previously processed purchase IDs from SharedPreferences.
_markPurchaseProcessed()
Future<void>
Persist a purchase ID to the processed set and SharedPreferences.
Parameters
| Name | Type | Description |
|---|---|---|
purchaseId |
String? |
_unmarkPurchaseProcessed()
Future<void>
Remove a purchase ID from the processed set (for retry scenarios).
Parameters
| Name | Type | Description |
|---|---|---|
purchaseId |
String? |
_persistProcessedIds()
Future<void>
Save current processed IDs set to SharedPreferences.
_loadProductConfig()
Future<void>
Load product IDs from JSON config file
updateWebViewController()
void
Update the webview controller reference (call when the webview is recreated).
Parameters
| Name | Type | Description |
|---|---|---|
controller |
InAppWebViewController |
updateUserId()
void
Update the cached user ID (useful after login changes).
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String? | New user identifier to be used by logging and requests. |
_isAnonymousId()
static bool
Check if a userId is an anonymous/device-generated ID (not a real email). These IDs start with 'app-' and are assigned before the user logs in. They should NEVER be used for payment processing.
Parameters
| Name | Type | Description |
|---|---|---|
id |
String? |
_recoverUserId()
Future<bool>
Aggressively recover userId from all available sources. This is the safety net that prevents payments from being lost. Recovery order: 1. SharedPreferences (cached_user_id) 2. WebView localStorage (userid)
Returns
true if userId was recovered and is now valid.
connectToStore()
Future<void>
Connect to the platform store, subscribe to purchase stream, and fetch available products and past purchases.
Throws
- If fetching products or purchases fails; errors are logged.
_listenToPurchase()
void
Process incoming purchase updates from the platform purchase stream. Validates receipts (iOS), posts payment info to backend, completes purchases, and logs events; handles pending, restored, error, and purchased statuses.
Parameters
| Name | Type | Description |
|---|---|---|
purchaseDetailList |
PurchaseDetails | List of PurchaseDetails emitted by the stream. |
_upsertPurchasedProductInMemory()
void
Puts the completed purchase into [_purchaseProducts] so [purchaseProducts] listeners (Store / Account subscription UI) refresh immediately. Previously only prefs/WebView were updated; the in-memory list stayed empty until the next full restore, so UI never reacted to [purchaseProducts].
Parameters
| Name | Type | Description |
|---|---|---|
details |
PurchaseDetails |
_convertPurchaseDetailsToJson()
String
Convert a PurchaseDetails object into a compact JSON string for storage.
Parameters
| Name | Type | Description |
|---|---|---|
purchaseDetails |
PurchaseDetails | PurchaseDetails to convert. |
Returns
JSON-encoded string with purchaseID, productID, transactionDate and status.
_handleError()
void
Handle IAP errors (currently logs to debug output).
Parameters
| Name | Type | Description |
|---|---|---|
error |
IAPError | IAPError instance reported by the platform. |
buyProduct()
Future<void>
Initiate purchase flow for a non-consumable product and handle platform specifics such as pending transactions or past purchases.
_getProducts()
Future<void>
Query the store for available products, populate local lists, and persist product data to SharedPreferences and webview if available.
Throws
- rethrows platform or network errors to callers.
_getPurchasedProducts()
Future<void>
Restore or query past purchases from the store, process Android startup purchases, persist results, and log findings.
Throws
- Exception if restore/query fails (re-thrown after logging).
_saveProduct()
Future<void>
Persist product JSON to SharedPreferences and optionally send it to the embedded webview client.
_savePurchaseProduct()
Future<void>
Persist purchase JSON to SharedPreferences, send it to webview, and clear affiliate code state if applicable.
handlePostPurchase()
Future<bool>
Post payment info to backend and call onSuccess when backend confirms.
Returns
true if backend payment entry succeeded; false otherwise.
retryPendingPurchases()
Future<void>
Retry any pending purchases that were stored due to missing userId. This should be called whenever a valid userId becomes available.
getCurrentSubscriptionStatus()
Future<Map<String, dynamic>?>
Check current local subscription status derived from restored purchases.
Returns
Map with 'hasSubscription' flag and details when available, or an error entry on failure.
clearProcessedPurchaseIds()
Future<void>
Clear the persisted processed-purchase-ID set. Call this before restoring so every past purchase is re-synced with the backend.
restorePurchases()
Future<void>
Public entry to restore purchases. Clears the processed-ID cache first so every past purchase is re-verified against the backend DB — this recovers "paid but no record" cases automatically.
dispose()
void
Dispose of subscriptions and platform-specific delegates.
Side Effects
Cancels purchase stream subscription and clears iOS delegate.
_userId()
Future<String?>
Returns current user email (already available via _userId in mobile)
openBillingPortal()
Future<void>
Web-only: Open Stripe billing portal
processCheckout()
Future<Map<String, dynamic>>
Web-only: Process Stripe checkout session
shouldContinueTransaction()
bool
Allow continued processing of transactions by default.
Returns
true to continue processing the given transaction.
shouldShowPriceConsent()
bool
Indicate whether price consent UI should be shown; returns false here.
Returns
false to avoid showing price consent prompt.
PurchaseService 16 methods purchase_service_stub.dart
Web stub for PurchaseService - In-app purchases not available on web Future: Will integrate with Stripe for web payments
Methods
initialize()
Future<void>
Initialize purchase service (no-op on web)
fetchStripeProducts()
Future<void>
Fetch Stripe products from Node.js backend
updateUserId()
void
Update user ID (no-op on web)
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String? |
updateWebViewController()
void
Update webview controller (no-op on web)
Parameters
| Name | Type | Description |
|---|---|---|
controller |
dynamic |
connectToStore()
Future<void>
Connect to store (no-op on web)
buyProduct()
Future<void>
Buy product (Stripe redirect for web)
openBillingPortal()
Future<void>
Open Billing Portal for subscription management
handlePostPurchase()
Future<bool>
Handle post purchase (no-op on web)
getCurrentSubscriptionStatus()
Future<Map<String, dynamic>?>
Get subscription status from backend
getUserMembershipStatus()
Future<Map<String, dynamic>>
Get user membership status (returns paid status from backend)
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
isDiscountsAvailable()
Future<Map<String, dynamic>>
Check if discounts are available (always false on web)
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
retryPendingPurchases()
Future<void>
Retry pending purchases (no-op on web)
clearProcessedPurchaseIds()
Future<void>
Clear processed purchase IDs (no-op on web)
restorePurchases()
Future<void>
Restore purchases (no-op on web)
dispose()
void
Dispose (no-op on web)
getCurrentUserEmail()
Future<String?>
Helper to get current user identifier (email) on web
QRService 4 methods qr_service.dart
Service class for handling QR code scanning functionality
Fields
| Name | Type |
|---|---|
qrText |
ValueNotifier<String?> |
Methods
_instance()
factory
Returns the shared QRService singleton used to manage scanning and scan state.
Returns
Shared QRService instance.
getCameraPermission()
Future<void>
Get camera permission for QR scanning
Side Effects
May request permissions, open app settings, show SnackBars, and start a scan.
scanQR()
Future<void>
Scan QR code using the camera
Side Effects
Updates [qrText], evaluates JavaScript on the web view, reads localStorage, and shows SnackBars.
dispose()
void
Dispose resources
Side Effects
Disposes the internal [qrText] ValueNotifier.
ReportService 7 methods report_service.dart
Service for generating astrological reports This service uses HoroscopeService as the main calculation engine and handles report generation for various chart types.
Fields
| Name | Type |
|---|---|
success |
bool |
reportData |
dynamic |
chartType |
ChartType? |
reportType |
String? |
metadata |
Map<String, dynamic>? |
error |
String? |
Uses Models
Methods
generateReport()
Future<ReportResult>
Generate an astrological report dynamically based on chart type. This method handles all report types using a single interface. It leverages HoroscopeService for payload building to avoid duplication.
_validateInputs()
void
Validate inputs based on chart type requirements
_buildPayload()
Future<ChartPayload>
Build chart payload using PayloadService Uses PayloadService public methods to build payload for reports. This ensures consistency with chart calculations throughout the app.
generateDataReport()
Future<ReportResult>
Generate AI report from structured data Use this for reports that don't require chart calculations: - Matrix category reports - Tarot readings (future) - Ritual guidance (future) Backend handles: - Prompt template selection - Constraint validation - AI generation - Response logging for AITrainer
generateMatrixReport()
Future<ReportResult>
Generate Matrix category report Type-safe wrapper for Matrix reports. Takes a MatrixReportRequest which contains all necessary data and metadata. Example: ```dart final request = MatrixReportRequest( category: 'Path & Career', viewFilter: 'foundation', items: filteredItems, userName: user.name, matrixType: MatrixType.self, ); final result = await reportService.generateMatrixReport(request); ```
toJson()
Map<String, dynamic>
Convert to JSON for backend
_normalizeView()
String
Normalize UI filter names to backend constants 'all birth' → 'foundation' 'weekly' → 'weekly' 'monthly' → 'monthly' 'progressed' → 'progressed' 'draconic' → 'draconic' 'all aspects' → 'all'
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
SabianService 6 methods sabian_service.dart
Service for fetching Sabian symbols and degree information ✅ Uses AstroHelper for modality/sign calculations ✅ Focused on API calls and cache management
Uses Models
Methods
getDegreeInfo()
Future<DegreeResult>
Get degree information including Sabian symbol Example API call: ``` GET https://astromatrix.org/API/Astrology/GetDegreeInfo ?degree=22 &sign=Sagittarius &type=Transit ```
getDegreeInfoFromItem()
Future<DegreeResult>
Get degree info from MatrixItem
getSabianImageUrl()
String
Get Sabian symbol image URL (REMOTE - use Image.network)
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String | |
degree |
int |
getSabianImageUrlFromInfo()
String
Get Sabian image URL from DegreeInfo
Parameters
| Name | Type | Description |
|---|---|---|
info |
DegreeInfo |
deck()
String
Get tarot card image URL (REMOTE - use Image.network)
Parameters
| Name | Type | Description |
|---|---|---|
tarotCard |
String | |
deck |
String |
file-level()
CriticalDegreeInfo?
Check if a degree is a critical degree ✅ Uses AstroHelper for modality lookup
Parameters
| Name | Type | Description |
|---|---|---|
degree |
int | |
sign |
String |
StartupService 11 methods startup_service.dart
Centralized service for handling app startup flow decisions. This service determines: 1. Whether the user is on a fresh install (no user ID) 2. Whether the user has any profiles in the database 3. What screen to show first (intro, daily, or webview) User ID Format: - App-generated IDs use prefix: `app-F` followed by 10+ digits - Example: `app-F1234567890` - This allows easy identification of app-created users vs WebView-created users
Methods
generateAppUserId()
static String
Generates a new app-specific user ID with format: app-F########## The numeric portion is at least 10 digits for uniqueness
isAppGeneratedUserId()
static bool
Check if a user ID was generated by the app
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String? |
useNewUI()
Future<StartupResult>
Main startup decision method Call this before showing any UI to determine the correct flow
Parameters
| Name | Type | Description |
|---|---|---|
useNewUI |
bool |
checkUserHasProfiles()
Future<bool>
Public check for whether the account has at least one profile (local or server). Use this before redirecting to intro so returning users with profiles go to daily.
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
markIntroCompleted()
Future<void>
Mark intro as completed (synced to server)
wasIntroCompleted()
Future<bool>
Check if intro was already completed
syncUserIdFromWebView()
Future<void>
Sync user ID from WebView (called when WebView reports a user ID) Only updates if we don't already have a valid user ID
Parameters
| Name | Type | Description |
|---|---|---|
webUserId |
String? |
getCurrentUserId()
Future<String?>
Get current user ID (does not generate one)
file-level()
String?
Pass startup user ID to WebView This ensures WebView has the correct user ID for its localStorage
_migrateWebLocalStorage()
Future<Map<String, String?>?>
Migrate raw localStorage (non-prefixed) values from old webapp to Flutter storage
TarotService 12 methods tarot_service.dart
Tarot service - matches TarotService.js functionality Handles spread layouts, card mappings, tarot-related operations, and API calls ✅ NO CACHING - ComponentService handles all caching when called via getItem()
Uses Models
Methods
convertTarotTitle()
static String
Convert Princess to Page, Prince to Knight Matches convertTarotTitle() in JS
Parameters
| Name | Type | Description |
|---|---|---|
title |
String |
getTarotCard()
Future<TarotCardResult>
Get tarot card data from API WITH AUTO-FETCHED TRAITS ✅ Matches getTarotCard() in JS ✅ Automatically fetches and includes traits in result ✅ NO CACHING - ComponentService handles caching when called via getItem() Parameters: - [cardImage]: Card key/image (e.g., "The Fool", "A00", etc.) - [deck]: Deck type ("rider waite", "astrotarot", "1" for reversed, null for default) - [reversed]: Whether card is reversed - [theme]: Card theme (optional) - [timeframe]: Timeframe in seconds (default: 60) - [category]: Trait category for API call (e.g., "Tarot", "Tarot Minor Arcana") - [language]: Language code (default: current language)
getTarotCardAsComponent()
Future<ComponentResult>
Get tarot card as ComponentResult (for ComponentService integration) ✅ Called by ComponentService when category is tarot-related ✅ Returns ComponentResult format with traits included ✅ NO CACHING - ComponentService handles caching ✅ Uses user's selected deck from storage
_fetchTarotTraits()
Future<TraitsResult>
Fetch tarot traits from GetComponentTraits API ✅ Called internally by getTarotCard() ✅ NO CACHING - ComponentService handles caching
_transformTraitsResponse()
Map<String, dynamic>
Transform flat array API response into grouped structure ✅ FULLY DYNAMIC - automatically handles ANY trait category from API
Parameters
| Name | Type | Description |
|---|---|---|
apiData |
dynamic |
openTarotCard()
Future<TarotCardResult>
Open tarot card modal (convenience method) Matches openTarotCard() in JS
openTarotLink()
Future<TarotCardResult?>
Open tarot card from URL link Matches openTarotLink() in JS Parses URL like: /tarot/astrotarot/A00 Extracts card code (A00) and opens with astrotarot deck
Parameters
| Name | Type | Description |
|---|---|---|
link |
String |
getSpreadLayout()
static List<int>
Get spread layout array - matches getSpreadBits() in JS Returns array where 0 = empty cell, 1-7 = card position For 3x3 grid spreads, returns 9 elements For linear spreads, returns card count
Parameters
| Name | Type | Description |
|---|---|---|
spreadName |
String |
forceRefresh()
static Future<List<TarotSpread>>
Get tarot spreads from API Matches getTarotSpreads() in JS Caches results for performance
Parameters
| Name | Type | Description |
|---|---|---|
forceRefresh |
bool |
getTarotList()
static Map<String, String>
Get list of cards by section (wands, pentacles, cups, swords, major) Matches getTarotList() in JS [deck] - Optional deck name. If 'rider waite' or 'rider', converts Princess->Page, Prince->Knight For Thoth-style decks (astrotarot, osho), keeps Princess/Prince names
Parameters
| Name | Type | Description |
|---|---|---|
section |
String | |
deck |
String? |
openTarotCardDetailPage()
void
Open tarot card detail screen InputParameters: - [cardName]: Name of the tarot card (e.g., "The Fool") - [context]: BuildContext for navigation For simplicity, this method creates a minimal MatrixItem and navigates to ComponentScreen directly. [category] is derived from the card name.
clearCache()
static void
Clear cached spreads (useful for refresh or logout)
ThemeService 3 methods theme_service.dart
=============================================================== THEME SERVICE =============================================================== Manages app theme state and notifies app when theme changes
Methods
onThemeChanged()
void
Callback that main.dart will register to rebuild the app
init()
Future<void>
Initialize theme from preferences
setTheme()
Future<void>
Update theme and save to preferences
Parameters
| Name | Type | Description |
|---|---|---|
themeStr |
String |
WebTextScaleService 0 methods web_text_scale_service.dart
Web-only app text scaling. Browsers do not expose OS text size to Flutter the same way as native; this stores a user-chosen scale in local storage.
Methods
WebViewService 15 methods webview_service_stub.dart
Web-safe stub implementation of WebViewService This provides a no-op implementation for web builds where InAppWebView is not available
Methods
initializeWebView()
void
Initialize webview with controller - no-op on web
Parameters
| Name | Type | Description |
|---|---|---|
controller |
dynamic |
setWebViewSettings()
Future<void>
Set webview settings - no-op on web
clearWebViewCache()
Future<void>
Clear webview cache - no-op on web
setupJavaScriptHandlers()
Future<void>
Setup JavaScript handlers - no-op on web
sendToWebView()
Future<void>
Send data to webview - no-op on web
Parameters
| Name | Type | Description |
|---|---|---|
action |
String | |
data |
dynamic |
sendJsonToWebView()
Future<void>
Send JSON data to webview - no-op on web
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
data |
Map<String, dynamic> |
syncSession()
Future<void>
Sync session with webview - no-op on web
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
loadUrl()
Future<void>
Load URL in webview - no-op on web
Parameters
| Name | Type | Description |
|---|---|---|
url |
String |
canGoBack()
Future<bool>
Check if webview can go back - always false on web
goBack()
Future<void>
Go back in webview - no-op on web
getCurrentUrl()
Future<dynamic>
Get current URL - always null on web
pause()
Future<void>
Handle app lifecycle pause - no-op on web
resume()
Future<void>
Handle app lifecycle resume - no-op on web
saveCurrentState()
Future<void>
Save current WebView state - no-op on web
dispose()
void
Dispose resources - no-op on web
Used By Widgets
- MyApp main.dart
MockJsonStorageService 1 methods calculate_horoscopes_test.dart
Mock JsonStorageService that doesn't use real database
Methods
main()
void
Diagnostic Test: Form vs UserProfile Calculation This test uses the SAME birth data and calls it two ways: 1. calculatePositionsForForm() - which gives CORRECT results 2. Save as UserProfile, then calculatePositions() - which gives WRONG results We then compare the payloads and results to find the difference.
TestableJsonStorageService 0 methods horoscope_dedup_test.dart
Mock storage that tracks cache operations
Methods
TestableAstroApiService 0 methods horoscope_dedup_test.dart
Mock API service that tracks calls
Methods
WIDGETS
MyApp 9 methods main.dart
Root widget for the application that wires up theming, navigator observers, and the web view entry screen. Summary: - Wraps MaterialApp with application-level configuration: theme, navigator keys, messenger key, and Firebase Analytics observer. - Injects provided WebViewService into the initial WebViewScreen to enable hybrid routing and communication between web and Flutter. - Dynamically updates theme based on ThemeService state changes. - Uses StartupResult to determine the initial screen (intro, daily, or webview).
Extends: StatefulWidget
Uses Services
Uses Models
Methods
_registerMobileRoutes()
void
Registers all new-UI Flutter routes into HybridRouter. Called at startup (when useNewUI=true) and on UI mode toggle.
_firebaseMessagingBackgroundHandler()
Future<void>
Firebase Cloud Messaging background handler used when messages arrive while the app is terminated or in background. Summary: - Ensures Firebase is initialized in the background isolate and logs the incoming message id.
Parameters
| Name | Type | Description |
|---|---|---|
message |
RemoteMessage | RemoteMessage instance delivered by FCM. |
Returns
Future<void> that completes when background initialization and logging are done.
Throws
- May throw Firebase related initialization exceptions (e.g., if Firebase.initializeApp fails).
Side Effects
Initializes Firebase in the background isolate and writes a debug log via debugPrint.
initPrivacyAndAds()
Future<void>
Initialize privacy and ads using CMP (Consent Management Platform) and iOS ATT flow. Summary: - Initializes Google Mobile Ads SDK and handles user consent flow via UMP (User Messaging Platform). - Requests ATT permission on iOS using AppTrackingTransparency. - Ensures MobileAds is initialized after consent state is resolved.
Returns
Future<void> that completes after attempting CMP, ATT, and MobileAds initialization.
Throws
- Exceptions from MobileAds initialization or UMP/ATT APIs may propagate but are caught internally; failures fall back to trying MobileAds.initialize().
Side Effects
Network and native SDK interactions: requests consent info updates, may present consent UI, may prompt for ATT permission, and initializes MobileAds which may load network resources.
_requestConsentInfo()
Future<void>
Request consent information update and show the consent form if required by UMP/ConsentInformation. Summary: - Calls ConsentInformation.instance.requestConsentInfoUpdate with the provided params. - If a consent form is available, tries to load and display it using ConsentForm.loadAndShowConsentFormIfRequired. - Completes when the UMP flow is finished or on timeout.
Returns
Future<void> that completes once the consent flow has been attempted (or timeout occurs).
Throws
- Errors are caught internally in this implementation; callers should expect this Future to complete even if UMP encounters an error.
Side Effects
May show native consent UI and update the internal consent state stored by the UMP native SDK (ConsentInformation.instance). May perform I/O/network calls internally as part of UMP SDK behavior.
_requestATTPermission()
Future<void>
Request Apple App Tracking Transparency (ATT) permission on iOS. Summary: - Uses AppTrackingTransparency.requestTrackingAuthorization to ask for user consent to track across apps/websites for advertising.
Returns
Future<void> that completes after requesting ATT permission (or immediately on platforms where ATT is not available).
Throws
- The call may throw on unexpected platform states; errors are caught in the implementation call sites as needed.
Side Effects
May trigger a native system permission prompt on iOS.
_initializeMobileAdsAfterConsent()
Future<void>
Initialize Google Mobile Ads after user consent state is known. Summary: - Checks UMP's canRequestAds state and initializes MobileAds.instance if advertising is permitted. - If canRequestAds is false, attempts a fallback initialization for testing or degraded flows.
Returns
Future<void> that completes once MobileAds initialization has been attempted.
Throws
- MobileAds initialization exceptions are caught and suppressed internally; callers should expect this Future to complete normally in error scenarios.
Side Effects
Initializes MobileAds SDK which may perform network calls and start ad services.
MyApp()
const
Constructs MyApp and injects the required [webViewService] and [startupResult].
_handleWebInitialReportUrl()
Future<void>
On web, check if the browser's initial URL is a shared report link and open the report modal. Called once after the first frame renders.
_getInitialScreen()
Widget
Determines the first widget to show based on startup checks. This prevents the "double-loading" flicker on web.
_QRScannerPage 4 methods qr_service.dart
Full-screen QR scanner page using mobile_scanner
Extends: StatefulWidget
Methods
_instance()
factory
Returns the shared QRService singleton used to manage scanning and scan state.
Returns
Shared QRService instance.
getCameraPermission()
Future<void>
Get camera permission for QR scanning
Side Effects
May request permissions, open app settings, show SnackBars, and start a scan.
scanQR()
Future<void>
Scan QR code using the camera
Side Effects
Updates [qrText], evaluates JavaScript on the web view, reads localStorage, and shows SnackBars.
dispose()
void
Dispose resources
Side Effects
Disposes the internal [qrText] ValueNotifier.
OptionsRow 1 methods form_controls.dart
Themed row for bottom modal with label. Use for any selection from a list of options.
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
CompactOptionsRow 1 methods form_controls.dart
Compact options row without label - starts from left edge. Use when you only need to show the selected value.
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
GlassModalShell 1 methods form_controls.dart
A reusable glass-morphism modal shell containing backdrop filter, handle, and header. Use this for consistent modal styling across the app.
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
OptionsBottomModal 1 methods form_controls.dart
Bottom Sheet for showing options instead of dropdown
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
_OptionsBottomModalRow 1 methods form_controls.dart
One option row styled like [SecondaryButton] (rate/review dialog).
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
ParameterControlSlider 1 methods form_controls.dart
Themed slider with label and value display. Use for numeric selections within a range.
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
SegmentToggle 1 methods form_controls.dart
Themed toggle switch with label Use for boolean on/off settings.
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
DateTimePickerField 1 methods form_controls.dart
Themed date/time picker field that opens native picker on tap Matches the styling of PrimaryTextField for consistency
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
PrimaryCheckboxField 1 methods form_controls.dart
Themed checkbox field that matches the styling of PrimaryTextField
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
ValidationText 1 methods form_controls.dart
Warning or validation message display
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
LabelText 1 methods form_controls.dart
Generic label text widget that follows the input theme styling Use for field labels, section headers, or any labeled text
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
AnimatedBottomSheetDropdown 1 methods form_controls.dart
Animated bottom-sheet dropdown with visible selection animation. - Animates selection before closing sheet - Delays pop to allow animation to play - Generic & reusable
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
ActionListBottomModal 1 methods form_controls.dart
Bottom Sheet for showing a list of actions (menu) with consistent styling. Similar to OptionsBottomModal but for actions instead of selection.
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
_ActionListBottomModalRow 1 methods form_controls.dart
One action row — same visual language as [SecondaryButton] / [_OptionsBottomModalRow].
Extends: StatelessWidget
Methods
_wrapOptionsSheet()
Widget
Sizes the options bottom sheet (height and optional centered width on tablet+).
GlassStripSurface 3 methods glass_theme.dart
Shared container for user header / any full-width glass strip. Pass [decoration] to override the default [glassSurfaceDecoration].
Extends: StatelessWidget
Methods
_glassStripAlphaFactor()
double
Same curve as [GlassUiTransparency.borderAlphaFactor] (kept here to avoid importing `glass_ui_transparency.dart`, which depends on [theme.dart]).
Parameters
| Name | Type | Description |
|---|---|---|
slider01 |
double |
glassSurfaceDecoration()
BoxDecoration
Background for header strips and tab tracks (uses [GlassThemeData]). [stripAlphaFactor] scales gradient alphas (1.0 = design defaults). Profile glass UI slider uses this on the left half of its range.
_SafeScrollbar 16 methods layouts.dart
Scrollbar that only enables thumbVisibility when its controller has a single ScrollPosition — avoids the assertion thrown when TabBarView or similar widgets share one controller across multiple scroll views.
Extends: StatefulWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
CompactLayout 16 methods layouts.dart
Compact two-part layout with a prominent banner and fixed content area, typically used for auth screens, short forms, or pages that need a strong visual header. Automatically handles keyboard visibility by resizing content and hiding/shrinking logo. Content is NOT scrollable - use Flexible/Expanded widgets in child for dynamic content.
Extends: StatefulWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
StructuredLayout 16 methods layouts.dart
Structured layout – for edit/add user, settings, or multi-field forms. Uses snap-to-top scrolling behavior for app bar.
Extends: StatefulWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
ContentLayout 16 methods layouts.dart
Content layout – for readings, long reports, articles, etc. Uses snap-to-top scrolling behavior for app bar.
Extends: StatefulWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
ListLayout 16 methods layouts.dart
List layout – optimized for displaying scrollable lists of items (users, transactions, etc.) Minimal banner, maximum list space, works with ListView. Uses snap-to-top scrolling behavior for app bar. [stickyContentHeader]: When true (default), the layout uses a fixed header area and [child] is placed in an Expanded scrollable area. When false, [child] is the only scrollable (e.g. a CustomScrollView) and the whole page scrolls together.
Extends: StatefulWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
MatrixControlPanel 16 methods layouts.dart
Compact panel widget for matrix controls (like the facet menu button)
Extends: StatelessWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
MatrixCategoryTab 16 methods layouts.dart
Category tab button widget
Extends: StatelessWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
MatrixViewToggle 16 methods layouts.dart
View mode toggle button
Extends: StatelessWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
ResponsiveGrid 16 methods layouts.dart
Builds a responsive grid that adapts to screen size and orientation Centralizes the logic for home cards and buttons
Extends: StatelessWidget
Methods
layoutAppBarPadding()
EdgeInsets
App bar inset: journal gutter + device [MediaQuery.viewPadding] so controls stay inside curved iPhone corners (SafeArea does not consume viewPadding).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutAppBarBlockHeight()
double
[MainAppbar] row + [layoutAppBarPadding] (matches sliver toolbar for title-only headers).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
layoutTabHeaderExpandedHeight()
double
Full floating header on [TabLayout] (title block + optional [GlassTabBar] + top controls).
CompactLayout()
const
Creates a CompactLayout with a banner (image/gradient/title) and a scrollable content section.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
StructuredLayout()
const
Creates a StructuredLayout preconfigured with tighter banner and larger content area to accommodate forms and multi-field content.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ContentLayout()
const
Creates a ContentLayout optimized for long-form content with generous padding.
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_updateStickyHeaderBg()
bool
Maps the body's scroll offset to the sticky-header background opacity. Only wired to the body's scroll (see the NestedScrollView body), so the floating-header coordinator's separate position can't perturb it.
Parameters
| Name | Type | Description |
|---|---|---|
notification |
ScrollNotification |
_buildStickyTopBlock()
Widget
Floating top block used when [TabLayout.stickyHeader] is provided: app bar + top controls + tabs + sticky header, stacked as one piece that floats away/back together. Background is transparent when the content is at the very top (so the header looks flush with the page background), and fades to the opaque scaffold colour once scrolled so the content doesn't bleed through the header as it floats back in mid-scroll.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
theme |
ThemeData |
file-level()
String?
Get current route path from ModalRoute
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildDesktopLayout()
Widget
Desktop layout: 3-column side-by-side with chart and expanded aspect table Left ~20%, chart ~50%, right ~30% — aspect table expanded, side columns less dense
_buildMobileLayout()
Widget
Mobile layout: Full chart with PageView
AppButton 1 methods ui_components.dart
Unified button widget for all UI buttons in AstroMatrix. Dynamically sizes according to layout, not fixed pixels.
Extends: StatelessWidget
Methods
Function()
final Widget
Build the card UI Size is the calculated card size for the grid
PrimaryTextLabel 1 methods ui_components.dart
Use this text field directly when you need a text label with primary or secondary button styling. Also can be used when you need a tappable text Optional [trailingIcon] is drawn at the trailing edge with [MainAxisAlignment.spaceBetween] when horizontal constraints are bounded (e.g. wrap in [Expanded] inside a [Row]). With unbounded width, the icon follows the label with a fixed gap instead.
Extends: StatelessWidget
Methods
Function()
final Widget
Build the card UI Size is the calculated card size for the grid
DualButton 1 methods ui_components.dart
Dual button toggle - two mutually exclusive options. Use for: Light/Dark mode, On/Off, Male/Female, etc.
Extends: StatelessWidget
Methods
Function()
final Widget
Build the card UI Size is the calculated card size for the grid
Panel 1 methods ui_components.dart
Styled panel with header and body, matching AngularJS settings panel style. Can be collapsible or static. Use anywhere you need grouped content.
Extends: StatefulWidget
Methods
Function()
final Widget
Build the card UI Size is the calculated card size for the grid
UIDivider 1 methods ui_components.dart
Visual divider/spacer between UI elements. Use to create visual breathing room.
Extends: StatelessWidget
Methods
Function()
final Widget
Build the card UI Size is the calculated card size for the grid
ReactiveLanguage 1 methods ui_components.dart
Helper widget that automatically rebuilds when language changes **or** when background GPT translations arrive (same [LanguageService] listener). Use this to wrap widgets that use getLang() so they update automatically when the user changes language in settings, and strings refresh when GPT fills missing keys without a manual navigation. Example: ```dart ReactiveLanguage( builder: (context) => Text(getLang('Settings')), ) ``` Without this wrapper, widgets using getLang() won't update when language changes.
Extends: StatelessWidget
Methods
Function()
final Widget
Build the card UI Size is the calculated card size for the grid
AdaptiveCardGrid 1 methods ui_components.dart
AdaptiveCardGrid A reusable responsive grid widget that: - Fits cards within available width & height - Maintains aspect ratio - Supports empty slots (via shouldBuildItem) - Delegates card UI to a builder callback
Extends: StatelessWidget
Methods
Function()
final Widget
Build the card UI Size is the calculated card size for the grid
CategoryIconAssetImage 8 methods component_image_helper.dart
[Image.asset] for bundled category icons: tries the primary path, then [ComponentImageHelper.midnightIconFallbackPath] when the light `-classic.png` asset is absent.
Extends: StatelessWidget
Uses Models
Methods
getImageUrl()
static String
Get image URL for any component type Automatically detects tarot cards and uses appropriate URL builder For tarot cards: - Delegates to TarotImageHelper - Returns: https://astromatrix.app/images/{deck}/{category}/{cardName}.jpg For regular components: - Uses standard component image path with -sm suffix - Returns: https://astromatrix.app/images/{path}-sm.jpg
getIconUrl()
static String
Get icon URL for component summary cards (same as getImageUrl)
file-level()
static String?
Light icons use `-classic.png`. If that file is missing from the bundle, load the paired `-midnight.png` (dark) asset instead.
Parameters
| Name | Type | Description |
|---|---|---|
assetPath |
String |
getFullImageUrl()
static String
Get full-size image URL (no -sm suffix)
isTarotCategory()
static bool
Check if category is tarot-related
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
getDisplayConfig()
static ImageDisplayConfig
Get display configuration for a component category
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
getImageUrlWithConfig()
static ImageUrlResult
Get both URL and display config together
_buildStandardImageUrl()
static String
Build standard component image URL (shared logic) This is the ONLY place we handle standard component images
AccountScreen 2 methods account_screen.dart
=============================================================== ACCOUNT SCREEN =============================================================== Entitlements-focused: what I have access to. Account = what I have access to (entitlements) Settings for account (appearance) live here. Routes: - Change Password -> /changepassword
Extends: StatefulWidget
Methods
_buildMobileContent()
Widget
Single-column layout for mobile.
_buildWideContent()
Widget
Two-column layout for web/tablet.
AddUserScreen 3 methods add_user.dart
Screen widget that displays a form for adding or updating user birth chart data. Now uses UserFormController for all business logic and state management.
Extends: StatefulWidget
Methods
_initializeFromQuery()
void
Initializes form values from query parameters if in edit mode.
_showConfirmationDialog()
Future<void>
Shows confirmation dialog with Big Three calculation
_saveUser()
Future<void>
Saves the user via UserFormController
ApplyDiscountScreen 0 methods apply_discount_screen.dart
Handles the web affiliate discount activation URL: https://astromatrix.app/affiliate/applyDiscount?code=PRIMO10 On mobile this URL is intercepted by [DeepLinkService._handleApplyDiscountLink] before it ever reaches the router. On web (Chrome) the router receives it as a normal page navigation, so we need a real screen. This screen: 1. Reads the `code` query param 2. Validates it against [AffiliateCodeConfig] 3. Saves it to SharedPreferences with timestamp 4. Immediately replaces itself with [StoreScreen] so the user lands on the store with discounted prices already loaded
Extends: StatefulWidget
CalendarScreen 8 methods calendars.dart
Calendar screen using standard TabBar with custom styling This gives us all built-in functionality (swipe, animations, accessibility) while maintaining your custom Matrix aesthetic
Extends: StatefulWidget
Uses Models
Methods
_vocToMatrixItem()
MatrixItem
Converts a [VOCItem] to a [MatrixItem] for component navigation.
Parameters
| Name | Type | Description |
|---|---|---|
item |
VOCItem |
_oobToMatrixItem()
MatrixItem
Converts an [OOBItem] to a [MatrixItem] for component navigation.
Parameters
| Name | Type | Description |
|---|---|---|
item |
OOBItem |
index()
void
Handles tapping a [MatrixItem] from Forecasts / Moon tabs. Supports optional list context (allItems + index) for Next/Back navigation.
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem | |
allItems |
MatrixItem | |
index |
int |
index()
void
Handles tapping a [VOCItem]. Supports list context for Next/Back.
Parameters
| Name | Type | Description |
|---|---|---|
item |
VOCItem | |
allVocItems |
VOCItem | |
index |
int |
index()
void
Handles tapping an [OOBItem]. Supports list context for Next/Back.
Parameters
| Name | Type | Description |
|---|---|---|
item |
OOBItem | |
allOobItems |
OOBItem | |
index |
int |
index()
void
Handles tapping a planet in Planetary Hours. Supports list context for Next/Back.
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String | |
allPlanets |
List<String>? | |
index |
int |
_findItem()
int
Tries to locate [target] inside [list] using eventId then component+begins.
Parameters
| Name | Type | Description |
|---|---|---|
target |
MatrixItem | |
list |
MatrixItem |
_handleSectionTap()
void
Section-aware tap handler. [offset] is the index of this section among the sections to chain (0=ShortTerm, 1=LongTerm, 2=Retro).
ChangePasswordScreen 0 methods change_password.dart
Screen that allows registered users to change their password. Unregistered users (app-generated IDs starting with 'app-F') are prompted to create an account first.
Extends: StatefulWidget
ChartScreen 24 methods chart_screen.dart
Main chart screen - displays interactive astrology charts UserHeader is normal component - NOT floating
Extends: StatefulWidget
Uses Models
Methods
getChartCategory()
static String
Delegates to [ChartService.getChartCategory]. Kept here for backward compatibility — prefer calling ChartService directly.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType | |
section |
String | |
itemType |
String |
_loadUsersFromQueryParams()
Future<bool>
Load user data from query parameters (for shared links) Parses u1* and u2* parameters and sets them in HoroscopeService **without** persisting synthetic ids ([ChartScreen] scoped ephemeral session). Also handles transitDate and relocation data. Returns true if user data was found and set, false otherwise.
file-level()
UserProfile?
Parse a UserProfile from query parameters with given prefix Prefix should be 'u1' or 'u2' Returns null if required fields are missing
file-level()
ChartType?
Parse chart type from query parameter
_loadSavedChartType()
Future<ChartType>
Load saved chart type from SharedPreferences Defaults to birth if nothing saved
_saveChartType()
Future<void>
Save chart type to SharedPreferences
Parameters
| Name | Type | Description |
|---|---|---|
type |
ChartType |
_prefetchAdjacentTransitDates()
void
Pre-compute (warm cache for) transit dates immediately ahead of and behind the current one, so tapping forward/back resolves instantly from cache instead of waiting on a network round-trip. Only meaningful for the time-sensitive chart types that expose the forward/back stepping buttons. Best-effort and fire-and-forget.
_resetTransitDateAndReload()
Future<void>
Reset transit date to current date/time and reload chart (bypassing cache)
_buildEdgeSwipeZones()
Widget
Transparent swipe-capture strips on the left and right edges of the page area. They sit above the chart WebView (which otherwise swallows all pointer events) and forward horizontal drags to the page controller.
_panelScrollWrapper()
Widget
Scrollable wrapper shared by the panel pages. Uses [AlwaysScrollableScrollPhysics] so the vertical scroller always stays in the gesture arena — even when content is shorter than the page — and wins downward drags instead of letting the horizontal PageView grab them.
Parameters
| Name | Type | Description |
|---|---|---|
content |
Widget |
_buildSignsAspectsPage()
Widget
Wider-screen variant: Signs and Aspects share one page in two columns.
_buildChartPage()
Widget
Chart page BODY only (no header/controls — those are static above the PageView). This is what swipes.
_tryAutoRelocate()
Future<bool>
Attempts to automatically use the transit location for relocation Falls back to GPS if no transit location is set
fullWidth()
Widget
Toggle button shown only for chart types that have an outer transit ring.
Parameters
| Name | Type | Description |
|---|---|---|
mobile |
required bool | |
fullWidth |
bool |
_capturePatternFormationsForJournal()
Future<List<Map<String, dynamic>>?>
Snapshot of aspect pattern formations for journal replay. Uses in-memory chart data when patterns are already loaded; otherwise performs a single `getPatterns: true` positions call so the journal entry can open the Patterns view without depending on a second fetch.
_saveChartToJournal()
Future<void>
Save the current chart configuration to journal.
_supportsTransitToggle()
bool
Only birth charts have an optional outer transit ring the user can hide.
isTablet()
Widget
Sliver-based scrollable — used as body of NestedScrollView.
Parameters
| Name | Type | Description |
|---|---|---|
isTablet |
bool |
_KeepAlivePage 24 methods chart_screen.dart
Keeps a swipeable page mounted while off-screen so it is built once and never disposed mid-session — in particular so the chart WebView is not torn down and re-rendered when the user swipes back to it.
Extends: StatefulWidget
Uses Models
Methods
getChartCategory()
static String
Delegates to [ChartService.getChartCategory]. Kept here for backward compatibility — prefer calling ChartService directly.
Parameters
| Name | Type | Description |
|---|---|---|
chartType |
ChartType | |
section |
String | |
itemType |
String |
_loadUsersFromQueryParams()
Future<bool>
Load user data from query parameters (for shared links) Parses u1* and u2* parameters and sets them in HoroscopeService **without** persisting synthetic ids ([ChartScreen] scoped ephemeral session). Also handles transitDate and relocation data. Returns true if user data was found and set, false otherwise.
file-level()
UserProfile?
Parse a UserProfile from query parameters with given prefix Prefix should be 'u1' or 'u2' Returns null if required fields are missing
file-level()
ChartType?
Parse chart type from query parameter
_loadSavedChartType()
Future<ChartType>
Load saved chart type from SharedPreferences Defaults to birth if nothing saved
_saveChartType()
Future<void>
Save chart type to SharedPreferences
Parameters
| Name | Type | Description |
|---|---|---|
type |
ChartType |
_prefetchAdjacentTransitDates()
void
Pre-compute (warm cache for) transit dates immediately ahead of and behind the current one, so tapping forward/back resolves instantly from cache instead of waiting on a network round-trip. Only meaningful for the time-sensitive chart types that expose the forward/back stepping buttons. Best-effort and fire-and-forget.
_resetTransitDateAndReload()
Future<void>
Reset transit date to current date/time and reload chart (bypassing cache)
_buildEdgeSwipeZones()
Widget
Transparent swipe-capture strips on the left and right edges of the page area. They sit above the chart WebView (which otherwise swallows all pointer events) and forward horizontal drags to the page controller.
_panelScrollWrapper()
Widget
Scrollable wrapper shared by the panel pages. Uses [AlwaysScrollableScrollPhysics] so the vertical scroller always stays in the gesture arena — even when content is shorter than the page — and wins downward drags instead of letting the horizontal PageView grab them.
Parameters
| Name | Type | Description |
|---|---|---|
content |
Widget |
_buildSignsAspectsPage()
Widget
Wider-screen variant: Signs and Aspects share one page in two columns.
_buildChartPage()
Widget
Chart page BODY only (no header/controls — those are static above the PageView). This is what swipes.
_tryAutoRelocate()
Future<bool>
Attempts to automatically use the transit location for relocation Falls back to GPS if no transit location is set
fullWidth()
Widget
Toggle button shown only for chart types that have an outer transit ring.
Parameters
| Name | Type | Description |
|---|---|---|
mobile |
required bool | |
fullWidth |
bool |
_capturePatternFormationsForJournal()
Future<List<Map<String, dynamic>>?>
Snapshot of aspect pattern formations for journal replay. Uses in-memory chart data when patterns are already loaded; otherwise performs a single `getPatterns: true` positions call so the journal entry can open the Patterns view without depending on a second fetch.
_saveChartToJournal()
Future<void>
Save the current chart configuration to journal.
_supportsTransitToggle()
bool
Only birth charts have an optional outer transit ring the user can hide.
isTablet()
Widget
Sliver-based scrollable — used as body of NestedScrollView.
Parameters
| Name | Type | Description |
|---|---|---|
isTablet |
bool |
ComponentScreen 0 methods component_screen.dart
Component detail screen - shows component summary Accepts MatrixItem directly Uses ContentLayout for consistent styling with snap-to-top scrolling behavior Content Gating: - Records each component view for gating purposes - Displays gated overlay when threshold is reached - User can watch ad or purchase to continue
Extends: StatefulWidget
Uses Models
DebugScreensScreen 0 methods debug_screens.dart
Debug Screens Navigation Page Provides quick access to all app screens for development and testing purposes.
Extends: StatelessWidget
DialogDebugGalleryScreen 0 methods dialog_debug_gallery_screen.dart
**Temporary** — open many popup variants side-by-side for visual QA (fonts/colors vs [AppDialogStyles] and theme).
Extends: StatelessWidget
ForgotPasswordScreen 1 methods forgot_password.dart
Screen widget that allows the user to request a password reset by entering an email address.
Extends: StatefulWidget
Methods
_handleForgotPassword()
Future<void>
Sends a password reset email for the entered address, validating input and showing user feedback.
Returns
A Future that completes when the request and resulting UI feedback are handled.
Side Effects
Calls ForgotPasswordService.sendResetEmail, shows snackbars/dialogs, and may navigate back to login.
_ForgotPasswordScreenState 1 methods forgot_password.dart
State for ForgotPasswordScreen that manages the email input, loading state, and sending reset requests.
Extends: State<ForgotPasswordScreen>
Methods
_handleForgotPassword()
Future<void>
Sends a password reset email for the entered address, validating input and showing user feedback.
Returns
A Future that completes when the request and resulting UI feedback are handled.
Side Effects
Calls ForgotPasswordService.sendResetEmail, shows snackbars/dialogs, and may navigate back to login.
GuideScreen 0 methods guide.dart
Main Guide screen with tabs for Astrology, Tarot, and Videos Everything scrolls away (app bar, title, tabs) for maximum screen space Uses the updated MatrixLayout with NestedScrollView Astrology and Tarot tab bodies use `GlassCard` section headers with gradient dividers and glass-style grid cells — see `astrology_guide_tabs.dart`.
Extends: StatefulWidget
HomeScreen 19 methods home_screen.dart
Main home screen for AstroMatrix Dashboard aggregating multiple astrological data sections
Extends: StatefulWidget
Uses Models
Methods
forceRefresh()
Future<void>
Preload all data needed for the Daily page in one go This prevents multiple API calls and makes the page feel instant
Parameters
| Name | Type | Description |
|---|---|---|
forceRefresh |
bool |
index()
void
Navigate to component screen. When [allItems] is provided the Next button can traverse the full list.
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem | |
allItems |
MatrixItem | |
index |
int |
_generateReport()
Future<void>
Generate AI report for a section (same pipeline as Matrix screen: API + journal, no modal).
_buildDailyOverview()
Widget
Build Daily Overview using MatrixCategoryPanel in grid view (reused from Matrix screen)
_buildCurrentJourney()
Widget
Build Current Journey using MatrixCategoryPanel in grid view (reused from Matrix screen)
_buildCoreThemes()
Widget
Build Core [phrase] Themes (e.g. Core Mind Themes) using MatrixCategoryPanel in grid view.
_buildImportantEvents()
Widget
Build Important Events using MatrixCategoryPanel in grid view. All filtering (category, moon, date-range, monthly horoscope) is handled by ForecastService._filterImportant — aligned with the JS EventsCtrl.js logic.
_buildCachedForecast()
Widget
Build Big Three text row (Sun, Moon, Ascendant)
_buildCachedForecast()
Widget
Build a forecast widget using cached data to avoid redundant API calls
_buildMasonryPanels()
Widget
Collect all dashboard panels and render them in a masonry-style two-column layout on desktop (no empty vertical gaps) or a simple stacked column on mobile.
_formatOrdinal()
String
Readable ordinals for house tiles, e.g. `4th`, `11th` (not unicode superscripts).
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
_buildMoonSectionPanels()
List<Widget>
Returns the moon section panels as a list for the masonry layout.
_buildPlanetListsPanels()
List<Widget>
Returns the planet list panels as a list for the masonry layout.
file-level()
List<MatrixItem>?
Builds a unified list of MatrixItems for the header tiles (Transit Moon, Lucky Number, Tarot Card, Sun Sign) for cross-tile Next/Back chaining in ComponentScreen.
file-level()
List<MatrixItem>?
Merged list of [NextMoonEvent] + [NextLunarEvent] for cross-item Next/Back.
HtmlReportScreen 0 methods html_report_screen.dart
Screen for displaying HTML reports (like full native matrix reports)
Extends: StatelessWidget
JournalScreen 0 methods journal.dart
Main Journal screen using TabBar pattern (consistent with CalendarScreen and MatrixScreen)
Extends: StatefulWidget
LoginFormWidget 2 methods login.dart
Reusable login form widget that can be used in dialogs or full screens
Extends: StatefulWidget
Methods
_buildSignInForm()
Widget
Builds the sign-in form using theme styling
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildRegisterForm()
Widget
Builds the register form using theme styling
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
LoginScreen 2 methods login.dart
Screen widget that displays a login form and related actions.
Extends: StatefulWidget
Methods
_buildSignInForm()
Widget
Builds the sign-in form using theme styling
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildRegisterForm()
Widget
Builds the register form using theme styling
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_LoginScreenState 2 methods login.dart
State implementation for [LoginScreen] that manages input controllers and login flow. Responsible for validating input, invoking the login service, showing feedback, and navigation.
Extends: State<LoginScreen>
Methods
_buildSignInForm()
Widget
Builds the sign-in form using theme styling
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildRegisterForm()
Widget
Builds the register form using theme styling
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
MatrixScreen 35 methods matrix.dart
Main Matrix screen using TabBar pattern (consistent with CalendarScreen)
Extends: StatefulWidget
Uses Models
Methods
_loadUsersFromQueryParams()
Future<bool>
Load user data from query parameters (for shared links)
_hydrateBirthChartSummaryRows()
void
Birth-chart cache rows for summary tiles — matches web HoroscopeServiceCtrl (`Orientals` + first `Ascendant in` row for chart ruler [ID]).
Parameters
| Name | Type | Description |
|---|---|---|
birthChart |
Map<String, dynamic> |
_loadSupplementaryData()
Future<void>
Loads supplementary data used only in the Summary tab (self matrix only). Mirrors weekly_report.dart: calls calculateHoroscopes directly so that result.data is a live reference with planetReturns/oriental intact, rather than relying on getHoroscopeFromMemory which may see a mutated cache.
_matrixTransitStepDays()
int
Matrix header back/forward: ±7 days in weekly (and default) modes, ±30 in monthly.
_getMatrixCurrentRoute()
String
Current route for bottom nav highlighting (Matrix tab always maps to `/facets`).
_buildCategoryOptionsRow()
Widget
Build category filter OptionsRow from MatrixService options
_buildPinnedUserHeader()
Widget
Pinned user header (names + transit nav). Stays static as part of the fixed top block (app bar + tabs + this). The report-type / share row is intentionally NOT included here — it scrolls with the content.
_buildTabContent()
Widget
Build content for each tab
Parameters
| Name | Type | Description |
|---|---|---|
categoryIndex |
int |
_buildReportActionsSliver()
Widget
Report-type dropdown + Share / Full Report row, as the first sliver of a tab body so it scrolls with the content (it is intentionally not pinned or part of the floating header).
_summaryFilterCategory()
String
Whether the summary tab shows any tile rows above the category gauge cards.
_buildSummaryTab()
Widget
Build summary tab showing MAIN CATEGORIES with summed subcategory counts
_buildOtherReportsGrid()
Widget
Build a grid of quick links to other reports
_buildReportItem()
Widget
Build an individual report link card
file-level()
String?
Web `populateData` passes the full Kin/Tone row into `getItem(..., item.ID, ...)`. Forward numeric ids when the API provides them so GetComponent matches web.
Parameters
| Name | Type | Description |
|---|---|---|
id |
int? |
_webHoroscopeSummarySymbolTheme()
String
Symbol theme name used by bundled app_assets: `classic` | `midnight`.
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool |
_guidingPlanetLeadingGlyph()
Widget
Guiding icon: always use bundled planet symbol asset.
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String | |
isDark |
bool | |
size |
double |
_buildMayanKinGlyphForSummary()
Widget
Maya Kin icon from bundled app_assets only.
Parameters
| Name | Type | Description |
|---|---|---|
kin |
MayanKin | |
isDark |
bool |
_buildCombinedSummaryStrip()
Widget
Combined horizontal strip showing Birth Extras, Returns, and Profection tiles all in one continuous scrolling list
_getBirthExtrasTiles()
List<Widget>
Get Birth Extras tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool | |
theme |
ThemeData |
_getReturnsTiles()
List<Widget>
Get Returns tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
returns |
PlanetReturn | |
isDark |
bool |
_getProfectionTiles()
List<Widget>
Get Profection tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool | |
theme |
ThemeData |
_buildReturnsSummary()
Widget
Planet-returns summary strip shown above category gauges when enabled by the current summary filter (all-aspects: all returns, weekly: solar/lunar).
Parameters
| Name | Type | Description |
|---|---|---|
returns |
PlanetReturn |
_profectionYearToItem()
MatrixItem
Converts a [ProfectionYear] (from the chart API) to a [MatrixItem] suitable for opening in [ComponentScreen]. All available fields are populated so that: - [ComponentSummary] has a description/phrase fallback when GetComponent returns no data for the 'Profections' category. - The correct numeric ID is forwarded to the GetComponent call so the backend can resolve the exact record. - [copyWith] is NOT used here because it historically dropped [eventId].
Parameters
| Name | Type | Description |
|---|---|---|
py |
ProfectionYear |
_timeLordToItem()
MatrixItem
Converts a [TimeLord] (from the chart API) to a [MatrixItem] suitable for opening in [ComponentScreen]. Same reasoning as [_profectionYearToItem].
Parameters
| Name | Type | Description |
|---|---|---|
tl |
TimeLord | |
profectionYearComponent |
String? |
_buildProfectionSummary()
Widget
Monthly summary extra: Annual Profections + Time Lord shown above the category gauges as a horizontal row of SmallTile glass cards, matching the style used for Planet Returns in the Weekly summary.
_pairMatrixSummaryTiles()
List<Widget>
Responsive grid for matrix summary [SmallTile]s (using adaptive columns).
Parameters
| Name | Type | Description |
|---|---|---|
tiles |
Widget |
_buildBirthExtrasSummary()
Widget
Birth extras: Guiding Planet, Chart Ruler, Life Path, Maya Kin, Maya Tone, OOB. Shown only for self-matrix all-aspects and birth filters.
_jumpToCategoryTab()
void
Jump to the specified category tab
Parameters
| Name | Type | Description |
|---|---|---|
categoryIndex |
int |
_jumpToFacetTab()
void
Jump to the tab containing the specified facet
Parameters
| Name | Type | Description |
|---|---|---|
facetName |
String |
attempt()
void
Scroll to a specific subCategory within the current tab
Parameters
| Name | Type | Description |
|---|---|---|
subCategoryName |
String | |
attempt |
int |
_generateReport()
Future<void>
Generate AI report for a subcategory
_getChartTypeForApi()
String
Helper to get the chart type string for API calls based on filter
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_getCategoryLabel()
String
Helper to get human-readable label for chart type filter
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_getHoroscopeTypeFromFilter()
String
Helper to map filter category to backend horoscope type
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_MatrixSummaryProgressGlassSection 35 methods matrix.dart
Single glass panel listing all main categories with gradient progress bars.
Extends: StatelessWidget
Uses Models
Methods
_loadUsersFromQueryParams()
Future<bool>
Load user data from query parameters (for shared links)
_hydrateBirthChartSummaryRows()
void
Birth-chart cache rows for summary tiles — matches web HoroscopeServiceCtrl (`Orientals` + first `Ascendant in` row for chart ruler [ID]).
Parameters
| Name | Type | Description |
|---|---|---|
birthChart |
Map<String, dynamic> |
_loadSupplementaryData()
Future<void>
Loads supplementary data used only in the Summary tab (self matrix only). Mirrors weekly_report.dart: calls calculateHoroscopes directly so that result.data is a live reference with planetReturns/oriental intact, rather than relying on getHoroscopeFromMemory which may see a mutated cache.
_matrixTransitStepDays()
int
Matrix header back/forward: ±7 days in weekly (and default) modes, ±30 in monthly.
_getMatrixCurrentRoute()
String
Current route for bottom nav highlighting (Matrix tab always maps to `/facets`).
_buildCategoryOptionsRow()
Widget
Build category filter OptionsRow from MatrixService options
_buildPinnedUserHeader()
Widget
Pinned user header (names + transit nav). Stays static as part of the fixed top block (app bar + tabs + this). The report-type / share row is intentionally NOT included here — it scrolls with the content.
_buildTabContent()
Widget
Build content for each tab
Parameters
| Name | Type | Description |
|---|---|---|
categoryIndex |
int |
_buildReportActionsSliver()
Widget
Report-type dropdown + Share / Full Report row, as the first sliver of a tab body so it scrolls with the content (it is intentionally not pinned or part of the floating header).
_summaryFilterCategory()
String
Whether the summary tab shows any tile rows above the category gauge cards.
_buildSummaryTab()
Widget
Build summary tab showing MAIN CATEGORIES with summed subcategory counts
_buildOtherReportsGrid()
Widget
Build a grid of quick links to other reports
_buildReportItem()
Widget
Build an individual report link card
file-level()
String?
Web `populateData` passes the full Kin/Tone row into `getItem(..., item.ID, ...)`. Forward numeric ids when the API provides them so GetComponent matches web.
Parameters
| Name | Type | Description |
|---|---|---|
id |
int? |
_webHoroscopeSummarySymbolTheme()
String
Symbol theme name used by bundled app_assets: `classic` | `midnight`.
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool |
_guidingPlanetLeadingGlyph()
Widget
Guiding icon: always use bundled planet symbol asset.
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String | |
isDark |
bool | |
size |
double |
_buildMayanKinGlyphForSummary()
Widget
Maya Kin icon from bundled app_assets only.
Parameters
| Name | Type | Description |
|---|---|---|
kin |
MayanKin | |
isDark |
bool |
_buildCombinedSummaryStrip()
Widget
Combined horizontal strip showing Birth Extras, Returns, and Profection tiles all in one continuous scrolling list
_getBirthExtrasTiles()
List<Widget>
Get Birth Extras tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool | |
theme |
ThemeData |
_getReturnsTiles()
List<Widget>
Get Returns tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
returns |
PlanetReturn | |
isDark |
bool |
_getProfectionTiles()
List<Widget>
Get Profection tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool | |
theme |
ThemeData |
_buildReturnsSummary()
Widget
Planet-returns summary strip shown above category gauges when enabled by the current summary filter (all-aspects: all returns, weekly: solar/lunar).
Parameters
| Name | Type | Description |
|---|---|---|
returns |
PlanetReturn |
_profectionYearToItem()
MatrixItem
Converts a [ProfectionYear] (from the chart API) to a [MatrixItem] suitable for opening in [ComponentScreen]. All available fields are populated so that: - [ComponentSummary] has a description/phrase fallback when GetComponent returns no data for the 'Profections' category. - The correct numeric ID is forwarded to the GetComponent call so the backend can resolve the exact record. - [copyWith] is NOT used here because it historically dropped [eventId].
Parameters
| Name | Type | Description |
|---|---|---|
py |
ProfectionYear |
_timeLordToItem()
MatrixItem
Converts a [TimeLord] (from the chart API) to a [MatrixItem] suitable for opening in [ComponentScreen]. Same reasoning as [_profectionYearToItem].
Parameters
| Name | Type | Description |
|---|---|---|
tl |
TimeLord | |
profectionYearComponent |
String? |
_buildProfectionSummary()
Widget
Monthly summary extra: Annual Profections + Time Lord shown above the category gauges as a horizontal row of SmallTile glass cards, matching the style used for Planet Returns in the Weekly summary.
_pairMatrixSummaryTiles()
List<Widget>
Responsive grid for matrix summary [SmallTile]s (using adaptive columns).
Parameters
| Name | Type | Description |
|---|---|---|
tiles |
Widget |
_buildBirthExtrasSummary()
Widget
Birth extras: Guiding Planet, Chart Ruler, Life Path, Maya Kin, Maya Tone, OOB. Shown only for self-matrix all-aspects and birth filters.
_jumpToCategoryTab()
void
Jump to the specified category tab
Parameters
| Name | Type | Description |
|---|---|---|
categoryIndex |
int |
_jumpToFacetTab()
void
Jump to the tab containing the specified facet
Parameters
| Name | Type | Description |
|---|---|---|
facetName |
String |
attempt()
void
Scroll to a specific subCategory within the current tab
Parameters
| Name | Type | Description |
|---|---|---|
subCategoryName |
String | |
attempt |
int |
_generateReport()
Future<void>
Generate AI report for a subcategory
_getChartTypeForApi()
String
Helper to get the chart type string for API calls based on filter
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_getCategoryLabel()
String
Helper to get human-readable label for chart type filter
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_getHoroscopeTypeFromFilter()
String
Helper to map filter category to backend horoscope type
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_MatrixSummaryCenteredDotBar 35 methods matrix.dart
Centered-neutral dot bar. - Centre of the track = net score of 0 (balanced). - Dot moves left for net-negative, right for net-positive. - Global [maxAbsNet] (max |net| across ALL category rows) sets the scale so the most extreme category's dot reaches the bar edge and all others are proportional to it.
Extends: StatelessWidget
Uses Models
Methods
_loadUsersFromQueryParams()
Future<bool>
Load user data from query parameters (for shared links)
_hydrateBirthChartSummaryRows()
void
Birth-chart cache rows for summary tiles — matches web HoroscopeServiceCtrl (`Orientals` + first `Ascendant in` row for chart ruler [ID]).
Parameters
| Name | Type | Description |
|---|---|---|
birthChart |
Map<String, dynamic> |
_loadSupplementaryData()
Future<void>
Loads supplementary data used only in the Summary tab (self matrix only). Mirrors weekly_report.dart: calls calculateHoroscopes directly so that result.data is a live reference with planetReturns/oriental intact, rather than relying on getHoroscopeFromMemory which may see a mutated cache.
_matrixTransitStepDays()
int
Matrix header back/forward: ±7 days in weekly (and default) modes, ±30 in monthly.
_getMatrixCurrentRoute()
String
Current route for bottom nav highlighting (Matrix tab always maps to `/facets`).
_buildCategoryOptionsRow()
Widget
Build category filter OptionsRow from MatrixService options
_buildPinnedUserHeader()
Widget
Pinned user header (names + transit nav). Stays static as part of the fixed top block (app bar + tabs + this). The report-type / share row is intentionally NOT included here — it scrolls with the content.
_buildTabContent()
Widget
Build content for each tab
Parameters
| Name | Type | Description |
|---|---|---|
categoryIndex |
int |
_buildReportActionsSliver()
Widget
Report-type dropdown + Share / Full Report row, as the first sliver of a tab body so it scrolls with the content (it is intentionally not pinned or part of the floating header).
_summaryFilterCategory()
String
Whether the summary tab shows any tile rows above the category gauge cards.
_buildSummaryTab()
Widget
Build summary tab showing MAIN CATEGORIES with summed subcategory counts
_buildOtherReportsGrid()
Widget
Build a grid of quick links to other reports
_buildReportItem()
Widget
Build an individual report link card
file-level()
String?
Web `populateData` passes the full Kin/Tone row into `getItem(..., item.ID, ...)`. Forward numeric ids when the API provides them so GetComponent matches web.
Parameters
| Name | Type | Description |
|---|---|---|
id |
int? |
_webHoroscopeSummarySymbolTheme()
String
Symbol theme name used by bundled app_assets: `classic` | `midnight`.
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool |
_guidingPlanetLeadingGlyph()
Widget
Guiding icon: always use bundled planet symbol asset.
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String | |
isDark |
bool | |
size |
double |
_buildMayanKinGlyphForSummary()
Widget
Maya Kin icon from bundled app_assets only.
Parameters
| Name | Type | Description |
|---|---|---|
kin |
MayanKin | |
isDark |
bool |
_buildCombinedSummaryStrip()
Widget
Combined horizontal strip showing Birth Extras, Returns, and Profection tiles all in one continuous scrolling list
_getBirthExtrasTiles()
List<Widget>
Get Birth Extras tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool | |
theme |
ThemeData |
_getReturnsTiles()
List<Widget>
Get Returns tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
returns |
PlanetReturn | |
isDark |
bool |
_getProfectionTiles()
List<Widget>
Get Profection tiles for combined strip
Parameters
| Name | Type | Description |
|---|---|---|
isDark |
bool | |
theme |
ThemeData |
_buildReturnsSummary()
Widget
Planet-returns summary strip shown above category gauges when enabled by the current summary filter (all-aspects: all returns, weekly: solar/lunar).
Parameters
| Name | Type | Description |
|---|---|---|
returns |
PlanetReturn |
_profectionYearToItem()
MatrixItem
Converts a [ProfectionYear] (from the chart API) to a [MatrixItem] suitable for opening in [ComponentScreen]. All available fields are populated so that: - [ComponentSummary] has a description/phrase fallback when GetComponent returns no data for the 'Profections' category. - The correct numeric ID is forwarded to the GetComponent call so the backend can resolve the exact record. - [copyWith] is NOT used here because it historically dropped [eventId].
Parameters
| Name | Type | Description |
|---|---|---|
py |
ProfectionYear |
_timeLordToItem()
MatrixItem
Converts a [TimeLord] (from the chart API) to a [MatrixItem] suitable for opening in [ComponentScreen]. Same reasoning as [_profectionYearToItem].
Parameters
| Name | Type | Description |
|---|---|---|
tl |
TimeLord | |
profectionYearComponent |
String? |
_buildProfectionSummary()
Widget
Monthly summary extra: Annual Profections + Time Lord shown above the category gauges as a horizontal row of SmallTile glass cards, matching the style used for Planet Returns in the Weekly summary.
_pairMatrixSummaryTiles()
List<Widget>
Responsive grid for matrix summary [SmallTile]s (using adaptive columns).
Parameters
| Name | Type | Description |
|---|---|---|
tiles |
Widget |
_buildBirthExtrasSummary()
Widget
Birth extras: Guiding Planet, Chart Ruler, Life Path, Maya Kin, Maya Tone, OOB. Shown only for self-matrix all-aspects and birth filters.
_jumpToCategoryTab()
void
Jump to the specified category tab
Parameters
| Name | Type | Description |
|---|---|---|
categoryIndex |
int |
_jumpToFacetTab()
void
Jump to the tab containing the specified facet
Parameters
| Name | Type | Description |
|---|---|---|
facetName |
String |
attempt()
void
Scroll to a specific subCategory within the current tab
Parameters
| Name | Type | Description |
|---|---|---|
subCategoryName |
String | |
attempt |
int |
_generateReport()
Future<void>
Generate AI report for a subcategory
_getChartTypeForApi()
String
Helper to get the chart type string for API calls based on filter
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_getCategoryLabel()
String
Helper to get human-readable label for chart type filter
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
_getHoroscopeTypeFromFilter()
String
Helper to map filter category to backend horoscope type
Parameters
| Name | Type | Description |
|---|---|---|
filter |
String |
MatrixReportScreen 0 methods matrix_report_screen.dart
Native Flutter replacement for the HTML Matrix Report. Displays grouped MatrixItems with detailed interpretations.
Extends: StatefulWidget
MessageDetailScreen 0 methods message_detail_screen.dart
Detail screen showing a conversation with another user or support
Extends: StatefulWidget
_MessageBubble 0 methods message_detail_screen.dart
Widget for displaying a single message bubble
Extends: StatelessWidget
MessagesScreen 0 methods messages_screen.dart
Messages inbox screen showing all conversations
Extends: StatefulWidget
_ConversationTile 0 methods messages_screen.dart
Widget for displaying a conversation in the list
Extends: StatelessWidget
MoonScreen 3 methods moon_screen.dart
Moon Report Screen Shows comprehensive moon information including phases, tarot, sabian symbols, VOC, and OOB
Extends: StatefulWidget
Uses Models
Methods
_generateReport()
Future<void>
Generate AI report for a section
_buildResponsiveMoonContent()
Widget
Builds the main responsive content section. On wide screens, it splits into two columns: Left: LargeMoonWidget (Image, Stats, Tarot, Sabian) Right: Forecasts (Sign Changes, Lunations, VOC, OOB)
Parameters
| Name | Type | Description |
|---|---|---|
data |
_MoonScreenData |
UsersScreen 6 methods pick_user.dart
Screen widget that displays a list of user profiles associated with the logged-in account. Query params: - param=matrix or param=relationship → picker mode for user2 - param=pickUser1 → picker mode for user1 - (none) → normal management mode
Extends: StatefulWidget
Methods
_loadUsers()
Future<void>
Loads users from the service.
_sortUsers()
List<UserProfile>
Sorts users: main user first, then alphabetically by name
Parameters
| Name | Type | Description |
|---|---|---|
userList |
UserProfile |
_setMainUser()
Future<void>
Set a user as the main user ENSURES: Exactly one main user by updating both local and backend
Parameters
| Name | Type | Description |
|---|---|---|
user |
UserProfile |
_deleteUser()
Future<void>
Delete a user profile ENSURES: Main user can NEVER be deleted
Parameters
| Name | Type | Description |
|---|---|---|
user |
UserProfile |
_buildMainUserBadge()
Widget
Pill-shaped "Main User" badge.
_buildEmbossedAvatar()
Widget
Circular avatar with gradient ring, soft gradient fill, and premium glow.
ReportScreen 1 methods report_screen.dart
Saved-report view. Renders a saved multi-item report (e.g. `matrix_full_native`) directly from its OWN saved HTML (`componentData['report']`) — the SAME source the PDF download is generated from. The on-screen text and the downloaded text are therefore identical: nothing is re-fetched, re-ordered, or re-labelled here. (Richer per-component styling can be layered on later; for now both the view and the PDF show exactly the same text fragments.)
Extends: StatelessWidget
Uses Models
Methods
_bodyHtml()
String
Extract just the `<body>` content of the saved report, dropping the document `<head>`/`<style>`/`<script>` chrome so it renders cleanly with the app theme. The text fragments are left exactly as saved.
ReportViewScreen 0 methods report_view_screen.dart
A simple screen to display an HTML report in a WebView.
Extends: StatelessWidget
HoroscopeSettingsScreen 2 methods settings.dart
=============================================================== HOROSCOPE SETTINGS SCREEN =============================================================== Astrology-specific settings screen. Contains all chart calculation, display, and astrology engine configuration options. Chart/matrix contextual settings only. Theme, language, notifications moved to Profile. Settings include: - Current location (transit location) - Transit date/time - Chart calculation (house system, time system) - Orbs (birth, relationship, horoscope) - Display options (planets, aspects, minor aspects) - Asteroids & extra bodies
Extends: StatefulWidget
Methods
_buildMobileContent()
Widget
Single-column layout for mobile.
_buildWideContent()
Widget
Two-column layout for web/tablet.
StoreScreen 3 methods store.dart
=============================================================== STORE SCREEN =============================================================== Main subscription/store screen for managing subscriptions and upgrades Shows: - Current subscription status (if any) - Available subscription tiers - Manage subscription button (for paid users) - Links to App/Play Store for subscription management
Extends: StatefulWidget
Methods
_loadStoreSubscriptionSnapshot()
Future<_StoreSubscriptionSnapshot>
Aligns with [MembershipWidget]: local + server membership + bypass via [SubscriptionManager.getComprehensiveSubscriptionInfo].
_buildMobileContent()
Widget
Single-column layout for mobile.
_buildWideContent()
Widget
Two-column layout for web/tablet.
TarotReadingPage 5 methods tarot_reading_page.dart
Single-page, non-scrolling tarot reading screen Supports spread selection, question dialog, card flipping, and metadata display Must fit entirely on screen in both portrait and landscape
Extends: StatefulWidget
Uses Models
Methods
_initializeWithParams()
Future<void>
Initialize with query parameters if provided
_selectSpread()
void
Change spread only — keeps the current question (no question prompt).
Parameters
| Name | Type | Description |
|---|---|---|
spread |
TarotSpread |
_buildSpreadOptionsRow()
Widget
Full-width spread picker (avoids [GlassDropdownBar.responsiveMaxWidth] 368px cap).
Parameters
| Name | Type | Description |
|---|---|---|
maxWidth |
double |
_buildReadingActionBar()
Widget
Change question + Get Reading — shared on spread picker and results.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_QuestionBottomModal 5 methods tarot_reading_page.dart
Large bottom sheet for the reading question (same shell as other pickers).
Extends: StatefulWidget
Uses Models
Methods
_initializeWithParams()
Future<void>
Initialize with query parameters if provided
_selectSpread()
void
Change spread only — keeps the current question (no question prompt).
Parameters
| Name | Type | Description |
|---|---|---|
spread |
TarotSpread |
_buildSpreadOptionsRow()
Widget
Full-width spread picker (avoids [GlassDropdownBar.responsiveMaxWidth] 368px cap).
Parameters
| Name | Type | Description |
|---|---|---|
maxWidth |
double |
_buildReadingActionBar()
Widget
Change question + Get Reading — shared on spread picker and results.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ReadingCardDisplaySinglePage 5 methods tarot_reading_page.dart
Enhanced ReadingCardDisplay for single-page layout with subtitle support
Extends: StatelessWidget
Uses Models
Methods
_initializeWithParams()
Future<void>
Initialize with query parameters if provided
_selectSpread()
void
Change spread only — keeps the current question (no question prompt).
Parameters
| Name | Type | Description |
|---|---|---|
spread |
TarotSpread |
_buildSpreadOptionsRow()
Widget
Full-width spread picker (avoids [GlassDropdownBar.responsiveMaxWidth] 368px cap).
Parameters
| Name | Type | Description |
|---|---|---|
maxWidth |
double |
_buildReadingActionBar()
Widget
Change question + Get Reading — shared on spread picker and results.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
UserWizardScreen 0 methods user_wizard_screen.dart
Wizard screen for new user creation during intro/onboarding flow. Uses StepMatrixWizard with UserFormController to collect user information and navigate to facets screen upon completion.
Extends: StatefulWidget
_NameStepContent 0 methods user_wizard_screen.dart
Step 1: Name input
Extends: StatelessWidget
_FacetStepContent 0 methods user_wizard_screen.dart
Step 2: Facet selection
Extends: StatelessWidget
_BirthDateTimeStepContent 0 methods user_wizard_screen.dart
Step 3: Birth date and time
Extends: StatelessWidget
_LocationStepContent 0 methods user_wizard_screen.dart
Step 4: Location selection
Extends: StatelessWidget
AvailableSubscriptionsWidget 2 methods available_subscriptions.dart
=============================================================== AVAILABLE SUBSCRIPTIONS WIDGET =============================================================== Displays a list of available subscription tiers Fetches products from SubscriptionManager and shows subscription cards
Extends: StatefulWidget
Uses Models
Methods
_getPricePeriod()
String
Get price period string based on product ID
Parameters
| Name | Type | Description |
|---|---|---|
product |
ProductDetails |
_getDefaultConfig()
SubscriptionProductConfig
Get default config for products not defined in tiers
Parameters
| Name | Type | Description |
|---|---|---|
product |
ProductDetails |
DiscountBanner 0 methods discount_banner.dart
=============================================================== DISCOUNT BANNER WIDGET =============================================================== Displays a banner showing active discount information Shows discount code, percentage, and expiry information
Extends: StatelessWidget
DiscountBadge 0 methods discount_banner.dart
Compact discount badge for smaller spaces
Extends: StatelessWidget
EditHandleDialog 1 methods edit_handle_dialog.dart
Dialog that lets the user change their public @handle. Gives live availability feedback (debounced) as the user types so they know immediately whether a name is taken, then validates + saves on confirm. Returns the saved handle via `Navigator.pop(context, newHandle)` on success.
Extends: StatefulWidget
Methods
_dismiss()
void
Single, idempotent dismissal path. Guards against the duplicate taps Flutter web can deliver, which otherwise pop the route twice and trip the navigator's `!_debugLocked` assertion.
MembershipWidgetTestHelpers 5 methods membership_widget.dart
=============================================================== TEST HELPERS - Mock subscription data for testing ===============================================================
Methods
mockAnnualSubscription()
static Map<String, dynamic>
Create mock subscription info for Annual subscription
mockWeeklySubscription()
static Map<String, dynamic>
Create mock subscription info for Weekly subscription
mockLifetimeSubscription()
static Map<String, dynamic>
Create mock subscription info for Lifetime subscription
mockFreeUser()
static Map<String, dynamic>
Create mock subscription info for Free user
mockSubscriptionWithDate()
static Map<String, dynamic>
Create mock subscription info with specific expiry date
ProfileHeaderSection 0 methods profile_sections.dart
=============================================================== REUSABLE PROFILE SECTIONS =============================================================== Stateless widgets for profile-related sections that can be included anywhere in the app (dialogs, bottom sheets, panels, etc.)
Extends: StatelessWidget
ProfileHeaderSection 0 methods profile_sections.dart
Profile header with user's identity and Big Three overview
Extends: StatelessWidget
AccountActionsSection 0 methods profile_sections.dart
Account management actions section
Extends: StatelessWidget
AppearanceSection 0 methods profile_sections.dart
Appearance settings section (theme, old UI toggle)
Extends: StatelessWidget
UserManagementSection 0 methods profile_sections.dart
User/profile management section
Extends: StatelessWidget
SubscriptionStatusSection 0 methods profile_sections.dart
Subscription status display section
Extends: StatelessWidget
AdMobNativeAd 0 methods ad_mob_native_ad.dart
A widget that displays a Google Native Ad. Native ads are more integrated into the app's content than standard banners.
Extends: StatefulWidget
AstrologyGuideWidget 3 methods astrology_guide_tabs.dart
Astrology Guide Widget - extracted content from AstrologyGuideScreen Shows category grids for Elements, Planets, Zodiac, Houses, etc.
Extends: StatefulWidget
Uses Models
Methods
guideSectionLeadingIcon()
Widget
Circular accent icon used in [GlassCard] section headers (Guide / Astrology).
Parameters
| Name | Type | Description |
|---|---|---|
icon |
IconData |
categoryKeyToLeadingIcon()
IconData
Maps API category keys to header icons (Astrology grids).
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
_buildGuideAllItems()
List<MatrixItem>
Builds a merged list of all guide items across categories for Next/Back.
GuideGridTile 3 methods astrology_guide_tabs.dart
Shared glass tile used by the Guide grids. Callers provide the content-specific icon/number and label while this keeps text color, spacing, clipping, and tap behavior consistent across sections.
Extends: StatelessWidget
Uses Models
Methods
guideSectionLeadingIcon()
Widget
Circular accent icon used in [GlassCard] section headers (Guide / Astrology).
Parameters
| Name | Type | Description |
|---|---|---|
icon |
IconData |
categoryKeyToLeadingIcon()
IconData
Maps API category keys to header icons (Astrology grids).
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
_buildGuideAllItems()
List<MatrixItem>
Builds a merged list of all guide items across categories for Next/Back.
TarotGuideWidget 3 methods astrology_guide_tabs.dart
Tarot Guide Widget - extracted content from TarotGuideScreen Shows category selection grid for Major Arcana and Minor Arcana suits
Extends: StatelessWidget
Uses Models
Methods
guideSectionLeadingIcon()
Widget
Circular accent icon used in [GlassCard] section headers (Guide / Astrology).
Parameters
| Name | Type | Description |
|---|---|---|
icon |
IconData |
categoryKeyToLeadingIcon()
IconData
Maps API category keys to header icons (Astrology grids).
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
_buildGuideAllItems()
List<MatrixItem>
Builds a merged list of all guide items across categories for Next/Back.
VideosGuideWidget 3 methods astrology_guide_tabs.dart
Videos Guide Widget - wraps VideoWidget for the guide screen
Extends: StatelessWidget
Uses Models
Methods
guideSectionLeadingIcon()
Widget
Circular accent icon used in [GlassCard] section headers (Guide / Astrology).
Parameters
| Name | Type | Description |
|---|---|---|
icon |
IconData |
categoryKeyToLeadingIcon()
IconData
Maps API category keys to header icons (Astrology grids).
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
_buildGuideAllItems()
List<MatrixItem>
Builds a merged list of all guide items across categories for Next/Back.
CategoryGrid 3 methods astrology_guide_tabs.dart
Reusable category grid widget (from astrology_guide.dart) All guide category sections share [_guideGridConfig] so tile dimensions stay consistent between subcategories while [ResponsiveGrid] adapts by width.
Extends: StatefulWidget
Uses Models
Methods
guideSectionLeadingIcon()
Widget
Circular accent icon used in [GlassCard] section headers (Guide / Astrology).
Parameters
| Name | Type | Description |
|---|---|---|
icon |
IconData |
categoryKeyToLeadingIcon()
IconData
Maps API category keys to header icons (Astrology grids).
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
_buildGuideAllItems()
List<MatrixItem>
Builds a merged list of all guide items across categories for Next/Back.
BirthDetailsSection 2 methods birth_details_section.dart
SINGLE SOURCE OF TRUTH for all birth details UI and logic Used by BOTH add_user screen AND user wizard Change date picker here → changes everywhere Change time picker here → changes everywhere Change location search here → changes everywhere
Extends: StatelessWidget
Methods
_selectBirthDate()
Future<void>
SINGLE place to change date picker behavior
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_selectBirthTime()
Future<void>
SINGLE place to change time picker behavior
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
NoTimeCheckbox 2 methods birth_details_section.dart
Checkbox for "I don't know my birth time" SINGLE place this is defined
Extends: StatelessWidget
Methods
_selectBirthDate()
Future<void>
SINGLE place to change date picker behavior
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_selectBirthTime()
Future<void>
SINGLE place to change time picker behavior
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
ForecastEventDateColumn 1 methods calendar_event_dates.dart
Date column for forecast list items: active badge + readable range when applicable.
Extends: StatelessWidget
Methods
calendarTransitDateLabel()
String
Readable date label for calendar transit rows (forecast, OOB, VOC).
ActiveWithDateColumn 1 methods calendar_event_dates.dart
Active badge stacked above a readable date range.
Extends: StatelessWidget
Methods
calendarTransitDateLabel()
String
Readable date label for calendar transit rows (forecast, OOB, VOC).
CalendarTransitDateBlock 1 methods calendar_event_dates.dart
Readable date block for OOB / VOC rows (optionally with time subtitle).
Extends: StatelessWidget
Methods
calendarTransitDateLabel()
String
Readable date label for calendar transit rows (forecast, OOB, VOC).
AstroChartWidget 5 methods astro_wheel.dart
Complete AstroChart Widget - Renders AND displays chart in one widget FIXES: ✅ Pan disabled at 100% zoom (scroll-friendly) ✅ Compact zoom controls (no percentage button) ✅ Dark mode debugging ✅ Smaller control sizes Usage: ```dart AstroChartWidget( astroData: chartData, chartType: 'birth', ) ``` Gestures: - Pinch: Zoom in/out - Drag: Pan (when zoomed) - Double-tap: Reset to 100% zoom - Single tap: Focus
Extends: StatefulWidget
Methods
_buildCacheKey()
String
Build a cache key for the current chart configuration
_addToCache()
void
Add image to static cache
Parameters
| Name | Type | Description |
|---|---|---|
key |
String | |
image |
Uint8List |
_resetView()
void
Reset view to original position and scale
_toggleZoom()
void
Toggle zoom on double tap (zoom in if at 1x, reset if zoomed)
Parameters
| Name | Type | Description |
|---|---|---|
details |
TapDownDetails |
_onInteractionUpdate()
void
Track scale changes
Parameters
| Name | Type | Description |
|---|---|---|
details |
ScaleUpdateDetails |
ChartCanvas 0 methods chart_canvas.dart
Chart canvas - renders chart using persistent ChartRenderingService UPDATED: No longer creates/disposes renderer per widget Uses persistent service that's always available
Extends: StatefulWidget
ExampleDirectRender 0 methods chart_canvas.dart
Example: Direct rendering without ChartCanvas widget
Extends: StatefulWidget
ChartWidget 2 methods chart_widgets.dart
Pure display widget for chart data No business logic - just renders what it's given
Extends: StatelessWidget
Methods
chartPanelTitleHeader()
Widget
Section title bar matching the Birth Planets panel header (chart side panels). Always uses [AppTheme.lightTheme] fill + dark text so titles stay readable when the panel sits over the dark nebula (transparent + black text was invisible).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
title |
String |
_getAspectTextColor()
Color
Get contrasting text color for aspect cell
Parameters
| Name | Type | Description |
|---|---|---|
backgroundColor |
Color |
SignPanel 2 methods chart_widgets.dart
Sign panel showing planets in signs and houses
Extends: StatelessWidget
Methods
chartPanelTitleHeader()
Widget
Section title bar matching the Birth Planets panel header (chart side panels). Always uses [AppTheme.lightTheme] fill + dark text so titles stay readable when the panel sits over the dark nebula (transparent + black text was invisible).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
title |
String |
_getAspectTextColor()
Color
Get contrasting text color for aspect cell
Parameters
| Name | Type | Description |
|---|---|---|
backgroundColor |
Color |
AspectTable 2 methods chart_widgets.dart
Aspect table showing aspect grid
Extends: StatelessWidget
Methods
chartPanelTitleHeader()
Widget
Section title bar matching the Birth Planets panel header (chart side panels). Always uses [AppTheme.lightTheme] fill + dark text so titles stay readable when the panel sits over the dark nebula (transparent + black text was invisible).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
title |
String |
_getAspectTextColor()
Color
Get contrasting text color for aspect cell
Parameters
| Name | Type | Description |
|---|---|---|
backgroundColor |
Color |
AsteroidTable 2 methods chart_widgets.dart
Asteroid table showing asteroid aspects in a grid format (like AspectTable) Horizontal (columns) and vertical (rows) are both filtered by user preferences.
Extends: StatefulWidget
Methods
chartPanelTitleHeader()
Widget
Section title bar matching the Birth Planets panel header (chart side panels). Always uses [AppTheme.lightTheme] fill + dark text so titles stay readable when the panel sits over the dark nebula (transparent + black text was invisible).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
title |
String |
_getAspectTextColor()
Color
Get contrasting text color for aspect cell
Parameters
| Name | Type | Description |
|---|---|---|
backgroundColor |
Color |
PersistentChartWebView 5 methods persistent_chart_webview_mobile.dart
Persistent WebView-based chart widget KEY DIFFERENCE from AstroChartWidget: - Uses a LIVE WebView instead of headless PNG rendering - Chart updates happen via JavaScript calls (instant, no re-render) - WebView stays alive across navigation (forward/back in transit mode) - Smooth transitions without "reset → render → render" flicker Usage: ```dart PersistentChartWebView( astroData: chartData, chartType: 'transit', onReady: () => print('Chart ready'), ) ```
Extends: StatefulWidget
Methods
_updateChartInPlace()
Future<void>
Update chart in-place via JavaScript (no WebView reload!)
forceRender()
Future<void>
Force full re-render (use sparingly)
_resetView()
void
Reset view to original position and scale
_toggleZoom()
void
Toggle zoom on double tap (zoom in if at 1x, reset if zoomed)
Parameters
| Name | Type | Description |
|---|---|---|
details |
TapDownDetails |
_onInteractionUpdate()
void
Track scale changes
Parameters
| Name | Type | Description |
|---|---|---|
details |
ScaleUpdateDetails |
ComponentActionButton 0 methods component_action_button.dart
Icon + label pill used in [ComponentSummary] action row; reuse anywhere you need the same chrome (e.g. Matrix header share / report).
Extends: StatelessWidget
ComponentSummary 17 methods component_summary.dart
Complete component summary with all trait boxes and navigation
Extends: StatefulWidget
Uses Models
Methods
_isSlowAspect()
bool
Returns true when an aspect's active window spans more than 3 days. Slow aspects show "Strongest: <date>" instead of "Exact <time>".
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem |
_getReportFacet()
String
Resolve a valid facet for report generation. Prefers [widget.reportFacet] (from deep link) over the item's own facet, falling back to a sensible default when neither is valid.
_findItem()
void
Navigate to related component using ComponentHelper ✅ Creates MatrixItem with id='undefined' (not null)
Parameters
| Name | Type | Description |
|---|---|---|
component |
String | |
category |
String |
_isRedundant()
bool
Check if a trait value (title or text) is redundant with the current item name
Parameters
| Name | Type | Description |
|---|---|---|
value |
String? |
_openCrystalTrait()
void
Crystal tile from [GetComponentTraits]: web uses `t.Component` + optional id.
Parameters
| Name | Type | Description |
|---|---|---|
crystal |
TraitItem |
_buildRightPanelChildren()
List<Widget>
Content that sits in the right panel on wide screens (and directly below the image on narrow screens): date/position info, facet trait tiles, and opportunities / challenges / affirmations.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_buildBelowFoldChildren()
List<Widget>
Content that always spans the full width below the image + right panel: affirmations, report data, description, navigation, sabian/tarot, and video.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_formatDate()
String
Format date for journal content
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
_getMonthAbbr()
String
Get month abbreviation
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
_appendTarotEsotericTraitBoxes()
void
Trait strip under tarot card image — mirrors web [Templates/Modals/_EsotericModal.html] (GetComponentTraits categories).
_buildTraitBoxes()
Widget
Build ALL trait boxes
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_buildTraitBox()
Widget
Build individual trait box (returns a placeholder containing data)
_buildResponsiveTraitBox()
Widget
Build individual responsive trait box using GlassInsetCell
_maybeSectionBox()
Widget
Web/wide: wraps a section's [content] in a [GlassInsetCell] box (same background as the trait boxes + the light-mode panel shadow). Mobile: no box — renders the content flush, matching the pre-box design.
_sectionHeader()
Widget
Section title: centered on wide/web, left-aligned on mobile.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData | |
label |
String | |
isWide |
bool |
_applyPersonNameReplacement()
String
For synastry/relationship aspects, replaces generic "the X person" phrases in description text with the actual user names. Pattern rules: "the other {planet} person" → second person's name (same-planet case) "the {planet1} person" → planet owner's name "the {planet2} person" → other person's name "the {ordinal} house person"→ house owner's name (always person 2) Direction is determined by hash[3]: '2' means the aspect is FROM person 2, so names are swapped. When a backend "reversed" field is added to [MatrixItem] it should be checked here instead of / in addition to the hash.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | |
item |
MatrixItem |
_TraitBoxPlaceholder 17 methods component_summary.dart
A simple placeholder widget that carries trait data to the build method. Not intended to be rendered directly.
Extends: StatelessWidget
Uses Models
Methods
_isSlowAspect()
bool
Returns true when an aspect's active window spans more than 3 days. Slow aspects show "Strongest: <date>" instead of "Exact <time>".
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem |
_getReportFacet()
String
Resolve a valid facet for report generation. Prefers [widget.reportFacet] (from deep link) over the item's own facet, falling back to a sensible default when neither is valid.
_findItem()
void
Navigate to related component using ComponentHelper ✅ Creates MatrixItem with id='undefined' (not null)
Parameters
| Name | Type | Description |
|---|---|---|
component |
String | |
category |
String |
_isRedundant()
bool
Check if a trait value (title or text) is redundant with the current item name
Parameters
| Name | Type | Description |
|---|---|---|
value |
String? |
_openCrystalTrait()
void
Crystal tile from [GetComponentTraits]: web uses `t.Component` + optional id.
Parameters
| Name | Type | Description |
|---|---|---|
crystal |
TraitItem |
_buildRightPanelChildren()
List<Widget>
Content that sits in the right panel on wide screens (and directly below the image on narrow screens): date/position info, facet trait tiles, and opportunities / challenges / affirmations.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_buildBelowFoldChildren()
List<Widget>
Content that always spans the full width below the image + right panel: affirmations, report data, description, navigation, sabian/tarot, and video.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_formatDate()
String
Format date for journal content
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
_getMonthAbbr()
String
Get month abbreviation
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
_appendTarotEsotericTraitBoxes()
void
Trait strip under tarot card image — mirrors web [Templates/Modals/_EsotericModal.html] (GetComponentTraits categories).
_buildTraitBoxes()
Widget
Build ALL trait boxes
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_buildTraitBox()
Widget
Build individual trait box (returns a placeholder containing data)
_buildResponsiveTraitBox()
Widget
Build individual responsive trait box using GlassInsetCell
_maybeSectionBox()
Widget
Web/wide: wraps a section's [content] in a [GlassInsetCell] box (same background as the trait boxes + the light-mode panel shadow). Mobile: no box — renders the content flush, matching the pre-box design.
_sectionHeader()
Widget
Section title: centered on wide/web, left-aligned on mobile.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData | |
label |
String | |
isWide |
bool |
_applyPersonNameReplacement()
String
For synastry/relationship aspects, replaces generic "the X person" phrases in description text with the actual user names. Pattern rules: "the other {planet} person" → second person's name (same-planet case) "the {planet1} person" → planet owner's name "the {planet2} person" → other person's name "the {ordinal} house person"→ house owner's name (always person 2) Direction is determined by hash[3]: '2' means the aspect is FROM person 2, so names are swapped. When a backend "reversed" field is added to [MatrixItem] it should be checked here instead of / in addition to the hash.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | |
item |
MatrixItem |
_SwipeableContent 17 methods component_summary.dart
A wrapper that detects horizontal swipes for navigation while preserving iOS native edge swipe-back gesture. Uses a [Listener] with pointer event interception that only triggers for swipes that start away from the screen edges, allowing iOS's built-in edge swipe-back to work unimpeded.
Extends: StatefulWidget
Uses Models
Methods
_isSlowAspect()
bool
Returns true when an aspect's active window spans more than 3 days. Slow aspects show "Strongest: <date>" instead of "Exact <time>".
Parameters
| Name | Type | Description |
|---|---|---|
item |
MatrixItem |
_getReportFacet()
String
Resolve a valid facet for report generation. Prefers [widget.reportFacet] (from deep link) over the item's own facet, falling back to a sensible default when neither is valid.
_findItem()
void
Navigate to related component using ComponentHelper ✅ Creates MatrixItem with id='undefined' (not null)
Parameters
| Name | Type | Description |
|---|---|---|
component |
String | |
category |
String |
_isRedundant()
bool
Check if a trait value (title or text) is redundant with the current item name
Parameters
| Name | Type | Description |
|---|---|---|
value |
String? |
_openCrystalTrait()
void
Crystal tile from [GetComponentTraits]: web uses `t.Component` + optional id.
Parameters
| Name | Type | Description |
|---|---|---|
crystal |
TraitItem |
_buildRightPanelChildren()
List<Widget>
Content that sits in the right panel on wide screens (and directly below the image on narrow screens): date/position info, facet trait tiles, and opportunities / challenges / affirmations.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_buildBelowFoldChildren()
List<Widget>
Content that always spans the full width below the image + right panel: affirmations, report data, description, navigation, sabian/tarot, and video.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_formatDate()
String
Format date for journal content
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
_getMonthAbbr()
String
Get month abbreviation
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
_appendTarotEsotericTraitBoxes()
void
Trait strip under tarot card image — mirrors web [Templates/Modals/_EsotericModal.html] (GetComponentTraits categories).
_buildTraitBoxes()
Widget
Build ALL trait boxes
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData |
_buildTraitBox()
Widget
Build individual trait box (returns a placeholder containing data)
_buildResponsiveTraitBox()
Widget
Build individual responsive trait box using GlassInsetCell
_maybeSectionBox()
Widget
Web/wide: wraps a section's [content] in a [GlassInsetCell] box (same background as the trait boxes + the light-mode panel shadow). Mobile: no box — renders the content flush, matching the pre-box design.
_sectionHeader()
Widget
Section title: centered on wide/web, left-aligned on mobile.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ThemeData | |
label |
String | |
isWide |
bool |
_applyPersonNameReplacement()
String
For synastry/relationship aspects, replaces generic "the X person" phrases in description text with the actual user names. Pattern rules: "the other {planet} person" → second person's name (same-planet case) "the {planet1} person" → planet owner's name "the {planet2} person" → other person's name "the {ordinal} house person"→ house owner's name (always person 2) Direction is determined by hash[3]: '2' means the aspect is FROM person 2, so names are swapped. When a backend "reversed" field is added to [MatrixItem] it should be checked here instead of / in addition to the hash.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | |
item |
MatrixItem |
CurrentLocationWidget 8 methods current_location.dart
Widget for managing current location (transit location) Supports both manual search and GPS retrieval
Extends: StatefulWidget
Uses Models
Methods
isCurrentLocationSet()
bool
Helper to check if current location is set in HoroscopeService
file-level()
Location?
Get current location if set, or null
getCurrentLocationText()
String
Get location display text for UI
_getGPSLocation()
Future<void>
Get current GPS location and reverse geocode to get town name
_reverseGeocode()
Future<String>
Reverse geocode coordinates to get town name
Parameters
| Name | Type | Description |
|---|---|---|
lat |
double | |
lng |
double |
_updateHoroscopeService()
void
Update HoroscopeService with current location
Parameters
| Name | Type | Description |
|---|---|---|
location |
Location |
_handleLocationSelected()
void
Handle manual location selection from search
Parameters
| Name | Type | Description |
|---|---|---|
location |
Location | |
townName |
String |
_handleGetGPSLocation()
void
Wrapper for GPS button - must be void, not async
CurrentDateTimeWidget 5 methods date_widget.dart
Widget for managing current transit date/time Updates HoroscopeService._transitDate for transit calculations
Extends: StatefulWidget
Methods
_isCloseToNow()
bool
Check if datetime is within 1 minute of now
Parameters
| Name | Type | Description |
|---|---|---|
dt |
DateTime |
_updateHoroscopeService()
void
Update HoroscopeService with new transit date
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
_pickDate()
Future<void>
Pick date
_pickTime()
Future<void>
Pick time
_resetToNow()
void
Reset to current date/time
FlushBackgroundOverlay 0 methods flush_background_overlay.dart
"Flush" background style overlay: - Dark-to-light transition - Non-linear "neat line" accent (curved highlight + subtle shadow)
Extends: StatelessWidget
LocationSearchField 5 methods location_search.dart
Reusable location search field widget with autocomplete suggestions. Suggestions are rendered in an [Overlay] so they float over all other content without affecting the surrounding layout — safe for both mobile and web regardless of scroll containers.
Extends: StatefulWidget
Uses Models
Methods
_getFieldWidth()
double
Get the current rendered width of the text field
_onSearchChanged()
void
Handle search text changes
Parameters
| Name | Type | Description |
|---|---|---|
query |
String |
_searchLocations()
void
Search for locations using LocationService
Parameters
| Name | Type | Description |
|---|---|---|
query |
String |
_selectLocation()
Future<void>
Handle location selection from suggestions
Parameters
| Name | Type | Description |
|---|---|---|
suggestion |
LocationSuggestion |
_handleAdvancedSearchToggle()
void
Handle advanced search toggle
Parameters
| Name | Type | Description |
|---|---|---|
value |
bool? |
_SuggestionsDropdown 5 methods location_search.dart
The floating suggestions dropdown, rendered inside the [Overlay]. Uses [CompositedTransformFollower] to position itself relative to the text field on both mobile and web.
Extends: StatelessWidget
Uses Models
Methods
_getFieldWidth()
double
Get the current rendered width of the text field
_onSearchChanged()
void
Handle search text changes
Parameters
| Name | Type | Description |
|---|---|---|
query |
String |
_searchLocations()
void
Search for locations using LocationService
Parameters
| Name | Type | Description |
|---|---|---|
query |
String |
_selectLocation()
Future<void>
Handle location selection from suggestions
Parameters
| Name | Type | Description |
|---|---|---|
suggestion |
LocationSuggestion |
_handleAdvancedSearchToggle()
void
Handle advanced search toggle
Parameters
| Name | Type | Description |
|---|---|---|
value |
bool? |
MatrixTab 0 methods matrix_tab.dart
Custom tab widget that works with standard TabBar/TabController Styled to match your Matrix aesthetic with custom icons Usage: ```dart TabBar( controller: _tabController, tabs: [ MatrixTab(label: 'Career', iconPath: 'app_assets/icons/career.png'), MatrixTab(label: 'Love', iconPath: 'app_assets/icons/love.png'), ], ) ```
Extends: StatelessWidget
CompactMatrixTab 0 methods matrix_tab.dart
Alternative: Icon-only tab (more compact)
Extends: StatelessWidget
AutoHideTabBar 0 methods matrix_tab.dart
Auto-hide TabBar wrapper with smooth slide animation Must be used with AutoHideTabBarWrapper that wraps the entire screen content Usage: ```dart class MyScreen extends StatefulWidget { @override State<MyScreen> createState() => _MyScreenState(); } class _MyScreenState extends State<MyScreen> with SingleTickerProviderStateMixin { late TabController _tabController; final _autoHideController = AutoHideTabBarController(); @override Widget build(BuildContext context) { return AutoHideTabBarWrapper( controller: _autoHideController, child: MatrixLayout( categoryTabs: AutoHideTabBar( controller: _autoHideController, tabBar: TabBar(controller: _tabController, tabs: [...]), ), child: TabBarView(controller: _tabController, children: [...]), ), ); } } ```
Extends: StatelessWidget
AutoHideTabBarWrapper 0 methods matrix_tab.dart
Wrapper that listens to scroll notifications and controls tab visibility Must wrap the entire screen to capture scroll events from TabBarView
Extends: StatefulWidget
StepMatrixWizardState 9 methods step_matrix_wizard.dart
Public state class to allow access via GlobalKey
Extends: State<StepMatrixWizard>
Methods
file-level()
String?
Validate if the wizard can proceed to the next step Return null if valid, or error message if invalid
Parameters
| Name | Type | Description |
|---|---|---|
stepIndex |
int |
onStepChanged()
void
Called when moving to the next step
Parameters
| Name | Type | Description |
|---|---|---|
newStepIndex |
int |
onComplete()
void
Called when wizard is completed
goNextStep()
Future<void>
Public method to trigger next step programmatically
_checkAutoAdvance()
void
Check if current step should auto-advance
_buildStepCapsuleIndicator()
Widget
Capsule bar above step title: solid for inactive/completed; gradient + glow when active.
file-level()
Widget?
Build step indicator header with thin bar indicators
file-level()
Widget?
Build footer buttons (Skip and Next/Finish)
_buildWizardBody()
Widget
Build wizard body with background decoration matching CompactLayout's pattern
UserHeaderWidget 8 methods user_header.dart
=============================================================== USER HEADER WIDGET =============================================================== Displays user information with auto-configuration based on context. Simple, no-nonsense header that goes in normal widget tree.
Extends: StatefulWidget
Methods
stepTransitDate()
static DateTime
Step a transit date by [amount] units of [unit]. Static so other screens (e.g. cache-prefetch logic) can compute adjacent dates identically to the header's back/forward navigation buttons.
_showTransitLocationPicker()
Future<void>
Show dialog to pick transit location
height()
Widget
Bottom edge line under the glass header strip; fades with glass UI slider.
Parameters
| Name | Type | Description |
|---|---|---|
height |
double |
_buildCollapsedHeader()
Widget
Build collapsed header - shows user name, edit icon, current date, transit date (if applicable), and nav buttons
_buildCollapsedTransitDate()
Widget
Build collapsed transit date display (larger font to utilize header space)
isSmall()
TextStyle
Get standardized text style for header info
Parameters
| Name | Type | Description |
|---|---|---|
isSmall |
bool | |
opacity |
double | |
color |
Color |
_buildCollapseToggle()
Widget
Build collapse/expand toggle button
CompactUserHeaderWidget 8 methods user_header.dart
=============================================================== COMPACT USER HEADER (for tight spaces) ===============================================================
Extends: StatelessWidget
Methods
stepTransitDate()
static DateTime
Step a transit date by [amount] units of [unit]. Static so other screens (e.g. cache-prefetch logic) can compute adjacent dates identically to the header's back/forward navigation buttons.
_showTransitLocationPicker()
Future<void>
Show dialog to pick transit location
height()
Widget
Bottom edge line under the glass header strip; fades with glass UI slider.
Parameters
| Name | Type | Description |
|---|---|---|
height |
double |
_buildCollapsedHeader()
Widget
Build collapsed header - shows user name, edit icon, current date, transit date (if applicable), and nav buttons
_buildCollapsedTransitDate()
Widget
Build collapsed transit date display (larger font to utilize header space)
isSmall()
TextStyle
Get standardized text style for header info
Parameters
| Name | Type | Description |
|---|---|---|
isSmall |
bool | |
opacity |
double | |
color |
Color |
_buildCollapseToggle()
Widget
Build collapse/expand toggle button
MoonPhaseTile 0 methods moon_phase_tile.dart
Full-width Moon Phase tile for the daily home screen. Shows a moon image on the left, and the phase name + degree/sign on the right, matching the design in the screenshot.
Extends: StatelessWidget
PlanetaryHourTile 1 methods planetary_hour_tile.dart
Planetary Hour tile for the daily home screen. Uses [SmallTile] so header / main / time row spacing matches Lucky/Tarot/Sun. Main row: planet glyph + ruler name in the fixed main slot; time uses [SmallTile.buildDailyTimeRange] as the third row (same [subtitleGap] as siblings).
Extends: StatelessWidget
Methods
_buildMainWidget()
static Widget
Planet + ruler in the main slot; [SmallTile] supplies height + center-left align.
RiseSetTile 1 methods rise_set_tile.dart
Tile displaying Sunrise/Set and Moonrise/Set times for the dashboard. On narrow screens, it supports being collapsible (hidden by default). On wide screens, it remains a simple tile without the header.
Extends: StatefulWidget
Methods
_buildTappableCard()
Widget
InkWell inside the card (same as [MoonPhaseTile]) — faster tap than wrapping [GlassCard] in [GestureDetector] + [IgnorePointer].
Parameters
| Name | Type | Description |
|---|---|---|
child |
Widget |
SmallTile 7 methods small_tile.dart
A half-width (2-column) daily summary tile rendered inside a [GlassCard]. Layout: ``` ┌─────────────────┐ │ label [icon] │ │ │ │ mainValue │ ← large number/text, OR mainWidget │ or widget │ │ │ │ subtitle │ └─────────────────┘ ``` Provide either [mainValue] for a large styled number/text, or [mainWidget] for fully custom content (e.g. a sign image).
Extends: StatelessWidget
Methods
dailyHeaderLabelStyle()
static TextStyle
Home daily header tiles (also used by [PlanetaryHourTile]).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
buildMainValueText()
static Widget
Main value text with centralized dark gradient (home + matrix tiles).
buildDailyTimeRange()
static Widget
`9:00 AM – 10:00 AM` with muted en-dash (Rise/Set pattern).
buildDailyPlanetSignSubtitle()
static Widget
Subtitle with bold sign (e.g. muted "Moon in " + bold "Cancer").
buildDailySignEmphasisSubtitle()
static Widget
Fallback when only a phrase is available: bold segment after last " in ".
matrixHeaderLabelStyle()
static TextStyle
Matrix summary strips — same colors/font family as home daily tiles; font sizes stay on [matrixMainValueFontSize] / matrix subtitle scale.
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
file-level()
Widget?
Category/planet PNGs: tinted when [trailingIconColor] is set; else full-color. Material [trailingIcon]: [trailingIconColor] or [muted] label color.
EphemerisWidget 0 methods ephemeris_widget.dart
Widget that displays an ephemeris table for a given month
Extends: StatefulWidget
ForecastConfig 2 methods forecast_widget.dart
Configuration for a forecast widget
Methods
_usesExpandedForecastRowStyle()
bool
Home/calendar forecast panels with larger rows (Moon Transits, Short/Long Term).
Parameters
| Name | Type | Description |
|---|---|---|
type |
ForecastType |
_forecastMoonReportTextColor()
Color
Moon report list rows: black headings in light mode (sign accent unchanged).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_ForecastHeader 2 methods forecast_widget.dart
A double-layered glass card header styled specifically for ForecastWidget. Places the title on the left and actions (showDuration toggle, info button) on the right.
Extends: StatelessWidget
Methods
_usesExpandedForecastRowStyle()
bool
Home/calendar forecast panels with larger rows (Moon Transits, Short/Long Term).
Parameters
| Name | Type | Description |
|---|---|---|
type |
ForecastType |
_forecastMoonReportTextColor()
Color
Moon report list rows: black headings in light mode (sign accent unchanged).
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
GatedContentWidget 3 methods gated_content_widget.dart
This is a reusable widget that can be inserted anywhere content needs to be gated. It handles: - Greyed out blocked state overlay - Purchase/subscription options - Watch Ad to Continue with countdown - Automatic refresh when ungated
Extends: StatefulWidget
Methods
showPremiumUpgradeDialog()
Future<void>
Show the standard "Content Locked" upgrade dialog. Used for BOTH the component-view limit and the save limit (charts/reports). Pass a custom [bodyMessage] to override the body text; defaults to the generic "watch ad or upgrade" message. Pass [onWatchAd] if the "Watch Ad" button should be available; omit it (leave null) to hide the button (e.g. for save-limit cases).
showUsageLimitModal()
Future<void>
Show the upgrade dialog when a free-tier save limit (charts or reports) is hit. Delegates to [showPremiumUpgradeDialog] so the UI is identical to the component-view gate. No "Watch Ad" button because saving is not something an ad can unlock.
_triggerDialog()
void
Show the same dialog as showUsageLimitModal — via showDialog, not inline.
GlassCard 0 methods glass_card.dart
A translucent card with a gradient border and a soft purple glow shadow. The background is ~90–98 % transparent so the page background shows through. The border uses [AppColors.glassGradient] by default. Optional [title], [titleIcon], and [titleTrailing]: when any of these are non-null (and [title] is non-empty when provided), a header row and [GradientDivider] are shown above [child]. Usage: ```dart GlassCard( title: 'The Elements', titleIcon: Icon(Icons.blur_on), child: Row(children: [...]), ) ```
Extends: StatelessWidget
GlassInsetCell 0 methods glass_card.dart
Compact glass-styled container for grid cells inside [GlassCard] sections. Lighter shadow, thinner border — matches nested tiles in the Guide layout.
Extends: StatelessWidget
GradientDivider 0 methods glass_card.dart
A full-width horizontal line painted with the app's glass gradient ([AppColors.glassGradient]). Useful as a styled divider in lists, sections, or anywhere a gradient separator is needed. Usage: ```dart // Simple divider const GradientDivider() // Thicker with margin GradientDivider(height: 1.5, margin: EdgeInsets.symmetric(vertical: 8)) // Custom colors GradientDivider(colors: [Colors.transparent, Colors.blue, Colors.transparent]) ```
Extends: StatelessWidget
DoubleGlassHeader 0 methods glass_card.dart
A premium, double-layered capsule card header styled for widgets.
Extends: StatelessWidget
TransitUpcomingBadge 0 methods glass_card.dart
A premium, standardized badge for upcoming transits (e.g. "Starts in 2 hours").
Extends: StatelessWidget
GlassDropdownBar 1 methods glass_dropdown_bar.dart
Glass-style control bar for "dropdown" rows: left label (and optional leading), current value and chevron on the right. Visually matches [ComponentActionButton] — same border radius, padding, background translucency, and border weight in both light and dark mode. Use from [OptionsRow], [CompactOptionsRow], [MatrixControlPanel], or anywhere you need a consistent category / picker affordance.
Extends: StatelessWidget
Methods
file-level()
static double?
Caps dropdown width on large layouts; phones stay full-width.
_TabVerticalDivider 1 methods glass_tab_bar.dart
Thin vertical rule between adjacent tab cells.
Extends: StatelessWidget
Methods
totalOuterHeight()
static double
Total vertical size: top divider + [height] track + bottom divider + layout slop.
HomeButtons 0 methods home_buttons.dart
Dashboard navigation buttons for home screen Displays 6 quick access buttons in a grid
Extends: StatelessWidget
AdWidget 1 methods inhouse_ad_widget.dart
Displays an in-house ad with subscription checking. Gets a NEW random ad each time the widget is created (e.g., navigating back to a page). Handles two failure modes gracefully: 1. Service not yet ready (cold-start race) — retries up to 5 seconds. 2. PromoImage URL empty or broken — retries with a fresh random ad.
Extends: StatefulWidget
Methods
_onImageError()
void
Called when the PromoImage fails — pick a fresh ad and try again.
JournalContentTab 0 methods journal_tabs.dart
Content tab - shows saved content journal entries Matches JournalCtrl.js with category 'Content'
Extends: StatefulWidget
JournalChartsTab 0 methods journal_tabs.dart
Charts tab - shows saved chart configurations
Extends: StatefulWidget
JournalReportsTab 0 methods journal_tabs.dart
Reports tab - shows chart reports journal entries Matches JournalCtrl.js with category 'Reports'
Extends: StatefulWidget
TarotJournalTab 0 methods journal_tabs.dart
Tarot Journal tab content - matches TarotJournalCtrl.js logic Displays journal history, stats, and past readings
Extends: StatefulWidget
LargeMoonWidget 0 methods large_moon_widget.dart
Large moon display widget for moon screen Shows detailed moon information with tarot card and sabian symbol Automatically fetches moon component description from ComponentService
Extends: StatefulWidget
MatrixCategoryPanel 0 methods matrix_category_panel.dart
Main category panel widget for displaying a subcategory section Shows: - Category header with title, report button, and help button - Matrix items in grid or list view [title] must be the **English** UI key (e.g. facet or section name); the header displays it via `getLang(title)`.
Extends: StatefulWidget
Uses Models
_CategoryHeader 0 methods matrix_category_panel.dart
Header section with title, report button, and help button. [title] is the English facet key; displayed text uses [getLang].
Extends: StatelessWidget
Uses Models
_MatrixItemsGrid 0 methods matrix_category_panel.dart
Grid view for matrix items
Extends: StatelessWidget
Uses Models
_MatrixItemsList 0 methods matrix_category_panel.dart
List view: single column on narrow screens, two columns on wide layouts.
Extends: StatelessWidget
Uses Models
_RadarWebGradientFillPainter 1 methods matrix_chart_widget.dart
Translucent layered fills: background shows through + soft 3D lighting (highlight top-left, shadow bottom-right).
Extends: CustomPainter
Methods
_matrixRadarPolygonPath()
Path
Same polygon as [fl_chart] `RadarChartPainter._generatePolygonPath`: center, radius = `min(w,h)/2 * 0.8`, first vertex at top.
Parameters
| Name | Type | Description |
|---|---|---|
size |
Size | |
vertexCount |
int |
_RadarWebGradientBorderPainter 1 methods matrix_chart_widget.dart
Gradient stroke on the outer polygon edge (cosmic violet → magenta).
Extends: CustomPainter
Methods
_matrixRadarPolygonPath()
Path
Same polygon as [fl_chart] `RadarChartPainter._generatePolygonPath`: center, radius = `min(w,h)/2 * 0.8`, first vertex at top.
Parameters
| Name | Type | Description |
|---|---|---|
size |
Size | |
vertexCount |
int |
MoonSignCard 0 methods moon_sign_card.dart
Shared glass-card widget for a single Moon Phase / Moon Transit item. Used by both the Moon Report screen and the Calendars Moon tab.
Extends: StatelessWidget
MoonTransitSection 0 methods moon_transit_section.dart
Full section chrome matching home [ForecastWidget] / Moon Transits: [GlassCard] title header + list rows below.
Extends: StatelessWidget
MoonTransitActionRow 0 methods moon_transit_section.dart
Single tappable row — Moon Transit chrome with [InfoRow] typography.
Extends: StatelessWidget
MoonConfig 0 methods moon_widget.dart
Configuration for the Moon widget
MoonWidget 0 methods moon_widget.dart
Widget displaying current moon phase and upcoming lunar events Shows: - Current moon phase with image - Next moon phase event - Next lunar event (eclipse, etc) - VOC (Void of Course) status - OOB (Out of Bounds) status
Extends: StatefulWidget
PersistentAdBanner 0 methods persistent_ad_banner.dart
A persistent banner ad widget that shows at the bottom of the screen. This widget: - Shows ads only for non-paid users - Renders once and persists across screen changes - Handles SafeArea properly for both paid and non-paid users - Hides immediately after payment acknowledgment
Extends: StatefulWidget
PlanetaryHourCardWidget 3 methods planetary_hours_widget.dart
Card widget displaying the current planetary hour Matches the Angular home widget layout
Extends: StatelessWidget
Methods
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
PlanetRiseSetTimesWidget 3 methods planetary_hours_widget.dart
Widget displaying sunrise/sunset and moonrise/moonset times. Glass-style panel: transparent fill, violet glow border, Solar | Lunar columns.
Extends: StatefulWidget
Methods
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
PlanetaryHoursListWidget 3 methods planetary_hours_widget.dart
Displays a list of planetary hours for the day Matches the AngularJS PlanetHoursCtrl layout
Extends: StatelessWidget
Methods
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
_formatTime()
String
Format datetime string to 12-hour time
Parameters
| Name | Type | Description |
|---|---|---|
dateTimeStr |
String? |
ReviewDialog 1 methods review_dialog.dart
Native review dialog that follows app's design system Shows after 3 sessions with 1 minute delay Uses existing SecondaryButton component for consistency
Extends: StatelessWidget
Methods
showReviewDialog()
Future<void>
Helper function to show the review dialog
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
RotatedAdWidget 0 methods rotated_ad_widget.dart
A wrapper widget that supports rotation between in-house ads and Google AdMob ads. This widget handles: - Subscription checks (shows nothing if user is subscribed) - Platform checks (shows only in-house ads on Web) - Rotation logic (percentage-based split on Mobile)
Extends: StatefulWidget
SabianSymbolWidget 0 methods sabian_symbol_widget.dart
Widget displaying Sabian symbol for a given degree/sign
Extends: StatelessWidget
OrbsSection 0 methods settings_sections.dart
=============================================================== REUSABLE SETTINGS SECTIONS =============================================================== Stateless widgets for each settings section that can be included anywhere in the app (dialogs, bottom sheets, panels, etc.) Matches AngularJS ng-include pattern for code reuse.
Extends: StatelessWidget
OrbsSection 0 methods settings_sections.dart
Orb settings section with sliders for birth, relationship, and horoscope orbs. Can be used in: Settings screen, Chart settings dialog, Quick settings sheet.
Extends: StatelessWidget
ChartCalculationSection 0 methods settings_sections.dart
Chart calculation section with house system and time system dropdowns. Can be used in: Settings screen, Chart view settings, New chart dialog.
Extends: StatelessWidget
DisplayOptionsSection 0 methods settings_sections.dart
Display options section with toggles for planets, aspects, etc. Can be used in: Settings screen, Chart view toolbar, Quick toggles sheet.
Extends: StatelessWidget
AsteroidsSection 0 methods settings_sections.dart
Asteroids and extra bodies section with all celestial object toggles. Can be used in: Settings screen, Chart configuration dialog.
Extends: StatelessWidget
ThemeLanguageSection 0 methods settings_sections.dart
Theme and language section with UI preferences. Can be used in: Settings screen, Welcome screen, Onboarding.
Extends: StatelessWidget
NotificationsSection 0 methods settings_sections.dart
Notifications section with forecast and transit notification settings. Can be used in: Settings screen, Notification preferences dialog.
Extends: StatelessWidget
AccessibilitySection 0 methods settings_sections.dart
Accessibility: native apps use OS text scaling; web uses a manual scale (browsers do not expose system font size to Flutter like iOS/Android).
Extends: StatelessWidget
UserOptionsSection 0 methods settings_sections.dart
User account options with login, register, and account management. Can be used in: Settings screen, Account menu.
Extends: StatelessWidget
SplashWidget 1 methods splash_widget.dart
A splash screen widget that displays an animated background image, current date, and a quote while loading initial splash data.
Extends: StatefulWidget
Methods
_loadSplashDataSync()
Future<void>
Loads splash image and quote from SharedPreferences or falls back to application-level variables (from `main.dart`) and defaults. Updates [currentSplashImage] and [currentQuote] accordingly.
Returns
Future that completes when loading is done.
Throws
- may catch and log exceptions when SharedPreferences fails.
Side Effects
performs I/O and updates [ValueNotifier]s.
_SplashWidgetState 1 methods splash_widget.dart
State for [SplashWidget] that manages animations, date values, and loading splash content.
Extends: State<SplashWidget>
Methods
_loadSplashDataSync()
Future<void>
Loads splash image and quote from SharedPreferences or falls back to application-level variables (from `main.dart`) and defaults. Updates [currentSplashImage] and [currentQuote] accordingly.
Returns
Future that completes when loading is done.
Throws
- may catch and log exceptions when SharedPreferences fails.
Side Effects
performs I/O and updates [ValueNotifier]s.
TabSwitcher 0 methods tab_switcher.dart
=============================== TAB SWITCHER WIDGET ===============================
Extends: StatelessWidget
_TabItem 0 methods tab_switcher.dart
=============================== INTERNAL TAB ITEM ===============================
Extends: StatelessWidget
FlipTarotCardWidget 0 methods flip_tarot_card_widget.dart
Flip card widget for tarot reading cards with 3D flip animation Supports sequential locking and draw order indicators
Extends: StatefulWidget
TarotSectionScreen 0 methods tarot_section.dart
Tarot section screen - displays cards in a selected category
Extends: StatefulWidget
TarotSpreadLayout 9 methods tarot_widgets.dart
Widget that displays tarot cards in their proper spread layout Uses TarotService.getSpreadLayout() to get the layout for any spread type Reusable for both journal history and new tarot readings
Extends: StatelessWidget
Uses Models
Methods
_tarotReadingQuestionDisplay()
String
Question line for list + edit modal: [JournalEntry.question], else the part before `|` from legacy titles ([subTitle] after [JournalEntry.fromJson]), else [JournalEntry.title] (spread-only label when nothing else exists).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadNameForJournal()
String
Spread label for card fetch / layout — after a `Q | spread` title split this is [JournalEntry.title], not [JournalEntry.subTitle] (that side is the question). Handles both formats: "Relationship" and "Relationship (7 Cards Above and 7 Below)"
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadDisplayName()
String
Display label for the spread name (without the group in parentheses) Used for showing the user-friendly name in the UI
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotNameOrSpreadDisplay()
String
Display label under question in history rows and edit metadata: custom [name] if provided, otherwise the spread title (without group).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_buildGridLayout()
Widget
Build 3x3 grid layout for spreads like Fork, Diamond, Cross
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
layout |
List<int> |
_buildLinearLayout()
Widget
Build linear layout for simple spreads (3 Card, 6 Card)
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildCardWidget()
Widget
Card widget for grid layouts (uses Expanded)
_buildLinearCardWidget()
Widget
Card widget for linear layouts (uses fixed height instead of Expanded)
_tarotStatsComponentNameForApi()
String
Suits stats use [TarotStats.card] = suit only (`Cups`) while [TarotStats.image] is a real card name (`Ace of Cups`) for URLs. [ComponentService.getItem] needs the full card name, not the bare suit.
Parameters
| Name | Type | Description |
|---|---|---|
stat |
TarotStats |
TarotJournalReadings 9 methods tarot_widgets.dart
Tarot journal readings list with expandable cards - matches _JournalTarotList.html Shows history of past tarot readings from journal
Extends: StatefulWidget
Uses Models
Methods
_tarotReadingQuestionDisplay()
String
Question line for list + edit modal: [JournalEntry.question], else the part before `|` from legacy titles ([subTitle] after [JournalEntry.fromJson]), else [JournalEntry.title] (spread-only label when nothing else exists).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadNameForJournal()
String
Spread label for card fetch / layout — after a `Q | spread` title split this is [JournalEntry.title], not [JournalEntry.subTitle] (that side is the question). Handles both formats: "Relationship" and "Relationship (7 Cards Above and 7 Below)"
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadDisplayName()
String
Display label for the spread name (without the group in parentheses) Used for showing the user-friendly name in the UI
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotNameOrSpreadDisplay()
String
Display label under question in history rows and edit metadata: custom [name] if provided, otherwise the spread title (without group).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_buildGridLayout()
Widget
Build 3x3 grid layout for spreads like Fork, Diamond, Cross
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
layout |
List<int> |
_buildLinearLayout()
Widget
Build linear layout for simple spreads (3 Card, 6 Card)
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildCardWidget()
Widget
Card widget for grid layouts (uses Expanded)
_buildLinearCardWidget()
Widget
Card widget for linear layouts (uses fixed height instead of Expanded)
_tarotStatsComponentNameForApi()
String
Suits stats use [TarotStats.card] = suit only (`Cups`) while [TarotStats.image] is a real card name (`Ace of Cups`) for URLs. [ComponentService.getItem] needs the full card name, not the bare suit.
Parameters
| Name | Type | Description |
|---|---|---|
stat |
TarotStats |
_JournalTopStatCardImage 9 methods tarot_widgets.dart
Top Pulled / Suits stat cell: shadow only while loading or on error; when the face image decodes, drop shadow. Prefer [TarotStats.contextCaption] (e.g. question) under the image; otherwise hide the card name when loaded (same idea as live reading cards showing question instead of repeating the name).
Extends: StatefulWidget
Uses Models
Methods
_tarotReadingQuestionDisplay()
String
Question line for list + edit modal: [JournalEntry.question], else the part before `|` from legacy titles ([subTitle] after [JournalEntry.fromJson]), else [JournalEntry.title] (spread-only label when nothing else exists).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadNameForJournal()
String
Spread label for card fetch / layout — after a `Q | spread` title split this is [JournalEntry.title], not [JournalEntry.subTitle] (that side is the question). Handles both formats: "Relationship" and "Relationship (7 Cards Above and 7 Below)"
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadDisplayName()
String
Display label for the spread name (without the group in parentheses) Used for showing the user-friendly name in the UI
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotNameOrSpreadDisplay()
String
Display label under question in history rows and edit metadata: custom [name] if provided, otherwise the spread title (without group).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_buildGridLayout()
Widget
Build 3x3 grid layout for spreads like Fork, Diamond, Cross
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
layout |
List<int> |
_buildLinearLayout()
Widget
Build linear layout for simple spreads (3 Card, 6 Card)
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildCardWidget()
Widget
Card widget for grid layouts (uses Expanded)
_buildLinearCardWidget()
Widget
Card widget for linear layouts (uses fixed height instead of Expanded)
_tarotStatsComponentNameForApi()
String
Suits stats use [TarotStats.card] = suit only (`Cups`) while [TarotStats.image] is a real card name (`Ace of Cups`) for URLs. [ComponentService.getItem] needs the full card name, not the bare suit.
Parameters
| Name | Type | Description |
|---|---|---|
stat |
TarotStats |
TarotJournalStats 9 methods tarot_widgets.dart
Stats widget with numbers only - matches _TarotStats.html Shows numerical statistics like Top Pulled Numbers
Extends: StatelessWidget
Uses Models
Methods
_tarotReadingQuestionDisplay()
String
Question line for list + edit modal: [JournalEntry.question], else the part before `|` from legacy titles ([subTitle] after [JournalEntry.fromJson]), else [JournalEntry.title] (spread-only label when nothing else exists).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadNameForJournal()
String
Spread label for card fetch / layout — after a `Q | spread` title split this is [JournalEntry.title], not [JournalEntry.subTitle] (that side is the question). Handles both formats: "Relationship" and "Relationship (7 Cards Above and 7 Below)"
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadDisplayName()
String
Display label for the spread name (without the group in parentheses) Used for showing the user-friendly name in the UI
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotNameOrSpreadDisplay()
String
Display label under question in history rows and edit metadata: custom [name] if provided, otherwise the spread title (without group).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_buildGridLayout()
Widget
Build 3x3 grid layout for spreads like Fork, Diamond, Cross
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
layout |
List<int> |
_buildLinearLayout()
Widget
Build linear layout for simple spreads (3 Card, 6 Card)
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildCardWidget()
Widget
Card widget for grid layouts (uses Expanded)
_buildLinearCardWidget()
Widget
Card widget for linear layouts (uses fixed height instead of Expanded)
_tarotStatsComponentNameForApi()
String
Suits stats use [TarotStats.card] = suit only (`Cups`) while [TarotStats.image] is a real card name (`Ace of Cups`) for URLs. [ComponentService.getItem] needs the full card name, not the bare suit.
Parameters
| Name | Type | Description |
|---|---|---|
stat |
TarotStats |
TarotJournalStatsTop 9 methods tarot_widgets.dart
Stats widget with card images - matches _TarotStatsTop.html Shows journal statistics with tarot card images
Extends: StatefulWidget
Uses Models
Methods
_tarotReadingQuestionDisplay()
String
Question line for list + edit modal: [JournalEntry.question], else the part before `|` from legacy titles ([subTitle] after [JournalEntry.fromJson]), else [JournalEntry.title] (spread-only label when nothing else exists).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadNameForJournal()
String
Spread label for card fetch / layout — after a `Q | spread` title split this is [JournalEntry.title], not [JournalEntry.subTitle] (that side is the question). Handles both formats: "Relationship" and "Relationship (7 Cards Above and 7 Below)"
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotSpreadDisplayName()
String
Display label for the spread name (without the group in parentheses) Used for showing the user-friendly name in the UI
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_tarotNameOrSpreadDisplay()
String
Display label under question in history rows and edit metadata: custom [name] if provided, otherwise the spread title (without group).
Parameters
| Name | Type | Description |
|---|---|---|
j |
JournalEntry |
_buildGridLayout()
Widget
Build 3x3 grid layout for spreads like Fork, Diamond, Cross
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
layout |
List<int> |
_buildLinearLayout()
Widget
Build linear layout for simple spreads (3 Card, 6 Card)
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext |
_buildCardWidget()
Widget
Card widget for grid layouts (uses Expanded)
_buildLinearCardWidget()
Widget
Card widget for linear layouts (uses fixed height instead of Expanded)
_tarotStatsComponentNameForApi()
String
Suits stats use [TarotStats.card] = suit only (`Cups`) while [TarotStats.image] is a real card name (`Ace of Cups`) for URLs. [ComponentService.getItem] needs the full card name, not the bare suit.
Parameters
| Name | Type | Description |
|---|---|---|
stat |
TarotStats |
TransitActiveBadge 1 methods transit_active_badge.dart
Shared "Happening now" badge for in-progress transit periods (OOB, retrograde, etc.).
Extends: StatelessWidget
Methods
activeTransitRowDecoration()
BoxDecoration
Border + fill styling for legacy transit panels (VOC etc.).
VOCWidget 0 methods voc_widget.dart
Reusable widget for displaying Void of Course data Matches the pattern of ForecastWidget (GetIt version)
Extends: StatefulWidget
MODELS
GPTResult gpt_service.dart
=============================================================== GPT RESULT - Response wrapper ===============================================================
Used By Services
- GPTBackend.prompt() gpt_service.dart
- GPTBackend.ask() gpt_service.dart
- GPTBackend.temperature() gpt_service.dart
- GPTBackend.analyze() gpt_service.dart
- GPTBackend.translate() gpt_service.dart
- RemoteGPTBackend.prompt() gpt_service.dart
- RemoteGPTBackend.ask() gpt_service.dart
- RemoteGPTBackend.temperature() gpt_service.dart
- RemoteGPTBackend.analyze() gpt_service.dart
- RemoteGPTBackend.translate() gpt_service.dart
- GPTService.prompt() gpt_service.dart
- GPTService.ask() gpt_service.dart
- GPTService.temperature() gpt_service.dart
- GPTService.analyze() gpt_service.dart
- GPTService.translate() gpt_service.dart
BirthForm birth_form.dart
Create a BirthForm with optional default values for all fields.
Purpose
Immutable BirthForm instance.
Used By Services
- PayloadService._formToChartDate() payload_service.dart
- ChartPreferences._formToChartDate() payload_service.dart
- BirthValidationService.isFormComplete() birth_validation_service.dart
- BirthValidationService.validateForm() birth_validation_service.dart
Used By Widgets
- LocationSearchField location_search.dart
- _SuggestionsDropdown location_search.dart
BirthFormState birth_form.dart
Create a BirthFormState combining form data with optional resolved location and computed results.
Purpose
Immutable BirthFormState instance.
BigThree birth_form.dart
Create a BigThree grouping required placements for sun, moon, and ascendant.
Purpose
Immutable BigThree instance.
Used By Services
- HoroscopeService.chartType() horoscope_service.dart
- HoroscopeService.getBigThree() horoscope_service.dart
Placement birth_form.dart
Create a Placement specifying sign, degree, minutes, and optional house.
Purpose
Immutable Placement instance.
Used By Functions
- _buildMatrixItem big_three_row.dart
ChartTypeConfig chart_payload.dart
Create a ChartTypeConfig instance.
Purpose
A configured ChartTypeConfig value.
ChartPayload chart_payload.dart
Create a ChartPayload for sending to the backend.
Purpose
ChartPayload instance ready for serialization.
Used By Services
- AstroApiService.calculateChart() astro_api_service.dart
- AstroApiService.generateReport() astro_api_service.dart
- PayloadService.buildFromUser() payload_service.dart
- PayloadService.buildFromForm() payload_service.dart
- PayloadService.buildCurrentPlanets() payload_service.dart
- ChartPreferences.buildFromUser() payload_service.dart
- ChartPreferences.buildFromForm() payload_service.dart
- ChartPreferences.buildCurrentPlanets() payload_service.dart
- ReportService._buildPayload() report_service.dart
PayloadOptions chart_payload.dart
Create a PayloadOptions object from collected form and location data.
Purpose
PayloadOptions instance.
EphemerisData ephemeris_models.dart
Complete ephemeris data for a month
Used By Services
- HoroscopeService.getEphemerisData() horoscope_service.dart
HoroscopeResponse horoscope_models.dart
Main API response wrapper - use this as the root when parsing responses
ChartData horoscope_models.dart
Complete chart data container - main data structure
LiveServerData live_server_data_model.dart
Data model representing a live server entry used for syncing and UI display.
Fields
| Name | Type |
|---|---|
id |
String |
cId |
String |
amount |
int |
value |
int |
webUrl |
String |
title |
String |
Used By Services
- IntegrationService._getSavedLiveServerData() integration_service_mobile.dart
- IntegrationService._saveLiveServerData() integration_service_mobile.dart
Location location.dart
Constructs a Location model containing town, coordinates, and timezone data.
Used By Services
- PayloadService._formToChartDate() payload_service.dart
- PayloadService.buildTransitDate() payload_service.dart
- ChartPreferences._formToChartDate() payload_service.dart
- ChartPreferences.buildTransitDate() payload_service.dart
- BirthValidationService.isFormComplete() birth_validation_service.dart
- LocationService.selectFromSuggestion() location_service.dart
- LocationService.selectLocation() location_service.dart
Used By Widgets
- CurrentLocationWidget current_location.dart
- LocationSearchField location_search.dart
- _SuggestionsDropdown location_search.dart
LocationSuggestion location.dart
Constructs a LocationSuggestion with basic place and coordinate info.
Used By Services
- AstroApiService.fetchCityLocations() astro_api_service.dart
- AstroApiService._fetchCityLocationsFromAstroMatrix() astro_api_service.dart
- AstroApiService._fetchCityLocationsFromGoogle() astro_api_service.dart
- LocationService.searchLocations() location_service.dart
Used By Widgets
- LocationSearchField location_search.dart
- _SuggestionsDropdown location_search.dart
ProductConfigModel product_config_model.dart
Model for product configuration loaded from JSON
ProductConfig product_config_model.dart
Individual product configuration
Used By Services
- ProductConfigService.file-level() product_config_service.dart
- ProductConfigService.excludeDiscounts() product_config_service.dart
- ProductConfigService.getRegularProducts() product_config_service.dart
- ProductConfigService.getProductsSortedByOrder() product_config_service.dart
- ProductConfigService.getProductsByType() product_config_service.dart
- ProductConfigService.getSubscriptionProducts() product_config_service.dart
- ProductConfigService.getLifetimeProducts() product_config_service.dart
- ProductConfigService.getDiscountProducts() product_config_service.dart
ProductData products.dart
Represents a product with pricing and descriptive fields used for JSON serialization.
PurchasedProductData purchase_products.dart
Represents purchased product information returned by a purchase system.
BirthValidationResult birth_validation_service.dart
Result of birth validation.
Used By Services
- BirthValidationService.validateBirthInfo() birth_validation_service.dart
SearchResult glossary_service.dart
Search result model
Used By Services
- GlossaryService.searchItems() glossary_service.dart
- GlossaryTerm.searchItems() glossary_service.dart
HelpData help_service.dart
Help data model
Used By Services
- HelpService.getHelp() help_service.dart
- HelpService._getFromCache() help_service.dart
- HelpService._addToCache() help_service.dart
ReportResult report_service.dart
Result of report generation operation
Fields
| Name | Type |
|---|---|
success |
bool |
reportData |
dynamic |
chartType |
ChartType? |
reportType |
String? |
metadata |
Map<String, dynamic>? |
error |
String? |
Used By Services
- ReportService.generateReport() report_service.dart
- ReportService.generateDataReport() report_service.dart
- ReportService.generateMatrixReport() report_service.dart
MatrixReportRequest report_service.dart
Request model for generating Matrix category reports
Fields
| Name | Type |
|---|---|
success |
bool |
reportData |
dynamic |
chartType |
ChartType? |
reportType |
String? |
metadata |
Map<String, dynamic>? |
error |
String? |
TarotReportRequest report_service.dart
Request model for generating Tarot reading reports (To be implemented)
Fields
| Name | Type |
|---|---|
success |
bool |
reportData |
dynamic |
chartType |
ChartType? |
reportType |
String? |
metadata |
Map<String, dynamic>? |
error |
String? |
_MockValidationResult user_form_controller.dart
Mock validation result for when service isn't called
PaginatedUsersResult user_service.dart
Represents a paginated response from the users endpoint.
Fields
| Name | Type |
|---|---|
mainUserClearedNotifier |
final ValueNotifier<int> |
_alignMainUserLock |
bool |
_profileCache |
final Map<String, UserProfile> |
_cachedUserList |
List<UserProfile>? |
_cachedLimitInfo |
UserLimitInfo? |
_getUsersInFlight |
final Map<String, Future<List<UserProfile>>> |
ImageUrlResult component_image_helper.dart
Result containing both URL and display configuration
Used By Widgets
- CategoryIconAssetImage component_image_helper.dart
JournalPatternPayload journal_pattern_payload.dart
Shrinks aspect pattern formations before embedding them in journal API payloads. Full API maps include large per-planet blobs; the chart renderer and [PatternCard] only need a small subset (see `ChartRenderingService.buildChartData`, Shapes.js).
Fields
| Name | Type |
|---|---|
maxFormations |
const int |
maxTransitRowsPerFormation |
const int |
_MoonScreenData moon_screen.dart
Internal data holder for moon screen
_TraitBoxData component_summary.dart
Internal data holder for trait boxes during build
Fields
| Name | Type |
|---|---|
autoReport |
bool |
reportFacet |
String? |
allItems |
List<MatrixItem>? |
currentListIndex |
int |
onNavigateNext |
VoidCallback? |
onNavigateBack |
VoidCallback? |
preloadedComponentData |
Map<String, dynamic>? |
reportLayout |
bool |
UTILITIES
AstrologyConstants 3 methods astrology_constants.dart
Zodiac sign symbols and images mapping
Methods
isDarkMode()
static String?
Get zodiac symbol image path for a given sign name Returns null if sign not found [isDarkMode] determines whether to use midnight (dark) or classic (light) theme for now keeping it true because the UI have same colors for both modes but in future if we edit its easy change
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String | |
isDarkMode |
bool |
file-level()
static Map<String, dynamic>?
Find timezone option by offset value
Parameters
| Name | Type | Description |
|---|---|---|
offsetMinutes |
int |
getTimezoneLabel()
static String
Get timezone label by offset value
Parameters
| Name | Type | Description |
|---|---|---|
offsetMinutes |
int |
MetricHelper 15 methods metrics_service.dart
Helper class for common metric operations
Methods
sendGauge()
Future<bool>
Send a gauge metric (sets absolute value)
sendCounter()
Future<bool>
Send a counter metric (increments by value)
pingOnline()
Future<int?>
Ping the server to mark user as online Endpoint: POST /events/metrics/pingonline [uid] - User ID to mark as active Returns the total number of active users
Parameters
| Name | Type | Description |
|---|---|---|
uid |
String |
getUsersOnline()
Future<int?>
Get current count of users online Endpoint: GET /events/metrics/usersonline Returns the number of active users
trackMeditationStart()
static Future<void>
Track meditation session start
Parameters
| Name | Type | Description |
|---|---|---|
userId |
String |
trackMeditationComplete()
static Future<void>
Track meditation session completion
trackApiError()
static Future<void>
Track API errors
Parameters
| Name | Type | Description |
|---|---|---|
endpoint |
String | |
errorType |
String |
trackFeatureUsage()
static Future<void>
Track feature usage
Parameters
| Name | Type | Description |
|---|---|---|
featureName |
String |
trackTarotTrait()
static Future<void>
Track tarot trait fetching
Parameters
| Name | Type | Description |
|---|---|---|
cardName |
String | |
category |
String |
file-level()
String?
Helper to get the screen name from a route
Parameters
| Name | Type | Description |
|---|---|---|
route |
Route |
_startTimer()
void
Start timer for a screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
_stopTimer()
Future<void>
Stop timer for a specific screen
Parameters
| Name | Type | Description |
|---|---|---|
screen |
String |
complete()
Future<void>
Mark the reading as completed and send metrics
cancel()
Future<void>
Mark the reading as canceled / incomplete
_sendMetrics()
Future<void>
Calculate duration and send metrics
AdHelper 0 methods ad_helper_mobile.dart
Provides platform-aware AdMob ad unit IDs and selects test IDs when in debug mode.
AdHelper 0 methods ad_helper_stub.dart
Web stub for AdHelper - Ads not available on web
AffiliateHelper 8 methods affiliate_helper_mobile.dart
Handles affiliate install tracking for both Android + iOS. Uses token from universal/deferred link (not Install Referrer).
Methods
checkAndSendInstall()
static Future<void>
Entry point — call once when the app launches. Checks SharedPreferences to avoid duplicate sends and triggers the install send if needed.
Side Effects
may perform network I/O and update SharedPreferences.
_sendInstall()
static Future<void>
Sends the affiliate install payload to the backend and stores any returned affiliate code.
Side Effects
performs network I/O and writes multiple SharedPreferences keys when a match is found.
_collectEnhancedDeviceInfo()
static Future<Map<String, dynamic>>
Gathers enhanced device fingerprint information including screen, timezone, language and platform specifics.
Returns
a Map with keys such as 'screen', 'timezone', 'language', and platform-specific fields.
Side Effects
may call platform APIs and device info plugin.
saveInstallToken()
static Future<void>
Saves the universal/deferred install token to SharedPreferences if non-empty.
Parameters
| Name | Type | Description |
|---|---|---|
token |
String | the install/deferred link token to persist. |
Side Effects
writes to SharedPreferences and logs the saved token.
getStoredCode()
static Future<String?>
Retrieves the stored affiliate code from SharedPreferences, if any.
Returns
the saved affiliate code or null.
clearAffiliateData()
static Future<void>
Clears all affiliate-related data from SharedPreferences.
Side Effects
removes multiple keys related to affiliate tracking and logs the action.
hasActiveDiscount()
static Future<bool>
Check if user has an active discount
Returns
true if there's a valid affiliate code stored (within 30 days)
getDiscountInfo()
static Future<Map<String, dynamic>>
Get discount info for display
Returns
Map with discount details including code, applied date, and days remaining
AffiliateHelper 8 methods affiliate_helper_stub.dart
Web implementation for AffiliateHelper - Affiliate tracking On web, affiliate codes are stored in SharedPreferences and can be applied via URL parameters or direct code entry.
Methods
checkAndSendInstall()
static Future<void>
Check and send install (on web, checks for affiliate clicks on startup)
checkAffiliateClick()
static Future<void>
Check affiliate click from URL parameters On web, this checks if there's an affiliate code in the URL
saveAffiliateCode()
static Future<void>
Save affiliate code to SharedPreferences
Parameters
| Name | Type | Description |
|---|---|---|
code |
String |
saveInstallToken()
static Future<void>
Save install token (no-op on web)
Parameters
| Name | Type | Description |
|---|---|---|
token |
String |
getStoredCode()
static Future<String?>
Get stored affiliate code from SharedPreferences
clearAffiliateData()
static Future<void>
Clear affiliate data from SharedPreferences
hasActiveDiscount()
static Future<bool>
Check if user has an active discount
getDiscountInfo()
static Future<Map<String, dynamic>>
Get discount info for display
AstroHelper 56 methods astro_helper.dart
Matrix Helper - Reusable utilities and reference data for astrology This is the SINGLE SOURCE OF TRUTH for all astrological reference data
Methods
getElement()
static String
Get element for a sign
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String |
getModality()
static String
Get modality for a sign
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String |
getRuler()
static String
Get planetary ruler for a sign
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String |
getHouseRuler()
static String
Get house ruler for a sign (1-12)
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String |
getElementPhrase()
static String
Get element phrase for a sign
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String |
getHouseTheme()
static String
Get house theme for a house number (1-12)
Parameters
| Name | Type | Description |
|---|---|---|
houseNumber |
int |
_getOrdinal()
static String
Get ordinal string (1st, 2nd, 3rd, etc.)
Parameters
| Name | Type | Description |
|---|---|---|
n |
int |
getPlanetSymbol()
static String
Get planet symbol
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String |
getPlanetColor()
static Color
Get planet color
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String |
getPlanetImagePath()
static String
Get planet image path
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String | |
isDarkMode |
bool |
getAspectSymbol()
static String
Get aspect symbol
Parameters
| Name | Type | Description |
|---|---|---|
aspect |
String |
getAspectColor()
static Color
Get aspect color
Parameters
| Name | Type | Description |
|---|---|---|
aspect |
String |
getAspectImagePath()
static String
Get aspect image path
Parameters
| Name | Type | Description |
|---|---|---|
aspect |
String | |
isDarkMode |
bool |
adjustOffset()
static void
Adjust date/time for timezone offset (used for API responses)
Parameters
| Name | Type | Description |
|---|---|---|
item |
dynamic | |
offsetMinutes |
int? |
file-level()
static DateTime?
Internal helper for parsing and shifting API dates
Parameters
| Name | Type | Description |
|---|---|---|
value |
dynamic | |
offsetMinutes |
int |
parseApiDate()
static DateTime
Parse date string from API (handles timezone conversion)
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String |
isToday()
static bool
Check if date is today
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDate()
static String
Format date as M/D/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDateShort()
static String
Format date as M/D/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDateWithSuffix()
static String
Format date as "Dec 4th"
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
includeMinutes()
static String
Format time as "1:48 AM"
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
includeMinutes |
bool |
formatDateRange()
static String
Format date range as "M/D - M/D"
Parameters
| Name | Type | Description |
|---|---|---|
start |
DateTime | |
end |
DateTime |
_getDaySuffix()
static String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
formatDuration()
static String
Format duration between two dates
Parameters
| Name | Type | Description |
|---|---|---|
start |
DateTime | |
end |
DateTime |
fullWords()
static String
Format number of days as a simplified duration string (e.g. "9 years, 2 months")
Parameters
| Name | Type | Description |
|---|---|---|
days |
int | |
fullWords |
bool |
daysUntil()
static int
Calculate days until a date
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDurationRemaining()
static String
Format duration remaining until a date (e.g., "5 days")
Parameters
| Name | Type | Description |
|---|---|---|
targetDate |
DateTime |
daysSince()
static int
Calculate days since a date
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
getTransitStatus()
static TransitStatus
Get transit status: active, upcoming, or past
Parameters
| Name | Type | Description |
|---|---|---|
begins |
DateTime | |
ends |
DateTime |
getDurationInfo()
static DurationInfo
Get duration info for a transit
getMoonPhaseImagePath()
static String
Get moon phase image path
Parameters
| Name | Type | Description |
|---|---|---|
segment |
int? |
getMoonPhaseName()
static String
Get moon phase name from segment
Parameters
| Name | Type | Description |
|---|---|---|
segment |
int? |
getTimeAway()
static String
Get time away from now to a given date Returns strings like "In 2 hours", "Happening Now", "Past"
Parameters
| Name | Type | Description |
|---|---|---|
targetDate |
DateTime | |
endDate |
DateTime |
isForecastRelevantNow()
static bool
Whether a forecast row should appear on calendars (active, upcoming, or ongoing). Unlike [MatrixItem.isActive], treats a missing [ends] as still current when [begins] is on or before today — needed for long-running sign ingresses (e.g. Saturn in Aries, Neptune in Aries).
activePeriodEndsLabel()
static String
Secondary label while a period is active, e.g. "Ends in 3 days".
Parameters
| Name | Type | Description |
|---|---|---|
begins |
DateTime | |
ends |
DateTime |
isPast()
static bool
Check if event is in the past
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
isFuture()
static bool
Check if event is in the future
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTimeRange()
static String
Format time range as "2:30 PM ~ 4:45 PM"
Parameters
| Name | Type | Description |
|---|---|---|
start |
DateTime | |
end |
DateTime |
getAllPlanets()
static List<String>
Get list of all planets (major + asteroids)
isAsteroid()
static bool
Check if a planet is an asteroid
Parameters
| Name | Type | Description |
|---|---|---|
planetName |
String |
isMajorPlanet()
static bool
Check if a planet is a major planet
Parameters
| Name | Type | Description |
|---|---|---|
planetName |
String |
planetToPlacement()
static Placement
Takes a Planet object from horoscope API and converts it to a Placement object used by BigThree and other models. Handles degree/minutes calculation and type conversions.
Parameters
| Name | Type | Description |
|---|---|---|
planet |
Planet | Planet object from horoscope service |
file-level()
static BigThree?
Extract Sun, Moon, and Ascendant from chart data
Parameters
| Name | Type | Description |
|---|---|---|
chartData |
Map<String, dynamic> |
formatPosition()
static String
Format placement as "Sign D°M'"
Parameters
| Name | Type | Description |
|---|---|---|
placement |
Placement |
formatPositionWithSymbol()
static String
Format placement as "D°M' SYMBOL"
Parameters
| Name | Type | Description |
|---|---|---|
placement |
Placement |
formatFullPlacement()
static String
Format placement with house
Parameters
| Name | Type | Description |
|---|---|---|
placement |
Placement |
getSignColor()
static Color
Get color for a sign based on its element from theme Fire → Red, Earth → Green, Air → Yellow, Water → Blue
Parameters
| Name | Type | Description |
|---|---|---|
context |
BuildContext | |
sign |
String |
getSignSymbol()
static String
Get sign symbol (zodiac glyph)
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String |
getExpression()
static String
Get expression trait for a planet (what the planet represents)
Parameters
| Name | Type | Description |
|---|---|---|
planet |
String |
getAspectAction()
static String
Get action trait for an aspect (how the aspect operates)
Parameters
| Name | Type | Description |
|---|---|---|
aspect |
String |
getHouseFocus()
static String
Get focus area for a house (what life area the house represents)
Parameters
| Name | Type | Description |
|---|---|---|
houseNumber |
int |
formatDegreesMinutes()
static String
Format astrological degrees and minutes Examples: 15.5° with minutes → "15°30'", without minutes → "15°"
isValidDegree()
static bool
Check if a degree value is valid for astrological use (0-30)
Parameters
| Name | Type | Description |
|---|---|---|
degree |
double |
getSignTheme()
static String
Get theme/keyword for a sign
Parameters
| Name | Type | Description |
|---|---|---|
sign |
String |
computePlanetTheme()
static String
Compute combined planet theme
getPlanetName()
static String
Returns the content-system planet name for a server planet integer. Returns 'Unknown' for out-of-range indices or bodies with no content (Earth).
Parameters
| Name | Type | Description |
|---|---|---|
planetInt |
int |
BrowserUtils 0 methods browser_utils_stub.dart
Stub implementation for browser-specific actions (non-web platforms)
BrowserUtils 0 methods browser_utils_web.dart
Web implementation for browser-specific actions
ImageDisplayConfig 8 methods component_image_helper.dart
Image display configuration for different component types
Methods
getImageUrl()
static String
Get image URL for any component type Automatically detects tarot cards and uses appropriate URL builder For tarot cards: - Delegates to TarotImageHelper - Returns: https://astromatrix.app/images/{deck}/{category}/{cardName}.jpg For regular components: - Uses standard component image path with -sm suffix - Returns: https://astromatrix.app/images/{path}-sm.jpg
getIconUrl()
static String
Get icon URL for component summary cards (same as getImageUrl)
file-level()
static String?
Light icons use `-classic.png`. If that file is missing from the bundle, load the paired `-midnight.png` (dark) asset instead.
Parameters
| Name | Type | Description |
|---|---|---|
assetPath |
String |
getFullImageUrl()
static String
Get full-size image URL (no -sm suffix)
isTarotCategory()
static bool
Check if category is tarot-related
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
getDisplayConfig()
static ImageDisplayConfig
Get display configuration for a component category
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
getImageUrlWithConfig()
static ImageUrlResult
Get both URL and display config together
_buildStandardImageUrl()
static String
Build standard component image URL (shared logic) This is the ONLY place we handle standard component images
Used By Widgets
- CategoryIconAssetImage component_image_helper.dart
ComponentImageHelper 8 methods component_image_helper.dart
Unified image URL helper for all component types Handles both standard components (planets, signs, etc.) AND tarot cards Delegates tarot image handling to TarotImageHelper to avoid duplication 🐛 DEBUG VERSION - Contains extensive logging for troubleshooting
Methods
getImageUrl()
static String
Get image URL for any component type Automatically detects tarot cards and uses appropriate URL builder For tarot cards: - Delegates to TarotImageHelper - Returns: https://astromatrix.app/images/{deck}/{category}/{cardName}.jpg For regular components: - Uses standard component image path with -sm suffix - Returns: https://astromatrix.app/images/{path}-sm.jpg
getIconUrl()
static String
Get icon URL for component summary cards (same as getImageUrl)
file-level()
static String?
Light icons use `-classic.png`. If that file is missing from the bundle, load the paired `-midnight.png` (dark) asset instead.
Parameters
| Name | Type | Description |
|---|---|---|
assetPath |
String |
getFullImageUrl()
static String
Get full-size image URL (no -sm suffix)
isTarotCategory()
static bool
Check if category is tarot-related
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
getDisplayConfig()
static ImageDisplayConfig
Get display configuration for a component category
Parameters
| Name | Type | Description |
|---|---|---|
category |
String |
getImageUrlWithConfig()
static ImageUrlResult
Get both URL and display config together
_buildStandardImageUrl()
static String
Build standard component image URL (shared logic) This is the ONLY place we handle standard component images
AppDateUtils 41 methods date_utils.dart
Comprehensive date, time, and timezone utility functions for parsing, formatting, and manipulating date/time data and timezone offsets.
Methods
parseTimeComprehensive()
static TimeComponents
Parse time string with comprehensive AM/PM support Handles: "14:30", "2:30 PM", "02:30:00" Returns hour in 24-hour format and minute Returns 12:00 (noon) as default if parsing fails
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
parseOffsetToMinutes()
static String
Parse timezone offset to minutes as string Handles: "UTC+01:00", "UTC-05:30", "+5.5", "-300", "300", "60.0" Returns offset in minutes as string (e.g., "-180" or "60")
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String |
formatTime12HourWithPeriod()
static String
Format time in 12-hour format with AM/PM period Example: formatTime12HourWithPeriod(14, 30) → "2:30 PM"
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int | |
minute |
int |
convertUtcToLocal()
static DateTime
Convert UTC DateTime to local timezone using offset in minutes. Returns a LOCAL DateTime object with the target's fields to prevent double-shifting when formatters or system properties call .toLocal().
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
file-level()
static DateTime?
Null-safe UTC to local conversion
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
_isUSLocale()
static bool
Determines if the current locale uses US date format (MM/DD/YYYY) vs EU (DD/MM/YYYY) US format: en_US, en_CA All others default to DD/MM/YYYY
formatDateLocale()
static String
Format date according to user's locale US: MM/DD/YYYY EU/other: DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
getLocaleDateFormat()
static DateFormat
Get localized DateFormat for display (not for API) US: 'MM/dd/yyyy' EU/other: 'dd/MM/yyyy'
getLocaleDateFormatHint()
static String
Get localized date picker format hint
getCurrentDateTime()
static DateTimeComponents
Get current date and time components
format12Hour()
static int
Format hour in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int |
file-level()
static DateTime?
Parse date string in format YYYY-MM-DD
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
file-level()
static TimeComponents?
Parse time string in format HH:MM
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
formatDate()
static String
Format date as MM/DD/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDateDDMMYYYY()
static String
Format date as DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTime12Hour()
static String
Format time in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour |
int | |
minute |
int |
getCurrentMonthYear()
static String
Get current month and year formatted
formatMonthYear()
static String
Format month and year (e.g., "January 2025")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Convert date and time components to DateTime
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? | |
timeStr |
String? |
formatDateWithSuffix()
static String
Format date with ordinal suffix (e.g., "Jan 5th", "Feb 22nd")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
static String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
file-level()
static String?
Format time if present (returns null if time is midnight)
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
file-level()
static DateTime?
Parse date from various formats
Parameters
| Name | Type | Description |
|---|---|---|
value |
dynamic |
formatDateForApi()
static String
Format date for API calls (MM/DD/YYYY) Used when sending dates to astrology calculation API NOTE: Always uses MM/DD/YYYY regardless of user locale
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTimeForApi()
static String
Format time for API calls (HH:MM in 24-hour format) Used when sending times to astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Parse date from API response (MM/DD/YYYY format) Used when receiving dates from astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
combineDateTime()
static DateTime
Combine date and time components into single DateTime
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
time |
TimeOfDay |
getCurrentDateForApi()
static String
Get current date formatted for API
getCurrentTimeForApi()
static String
Get current time formatted for API
formatDateTimeForApi()
static Map<String, String>
Format DateTime for API (combines date and time) Returns a map with 'date' and 'time' keys
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
getTimeOffset()
static String
Returns the provided offset string or the default value as a string when the offset is null or empty.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String? | nullable offset string |
defaultValue |
int | fallback integer value returned as string when offset is null/empty |
Returns
offset string or defaultValue as string
parseOffset()
static double
Parses a timezone offset string (e.g., "+5.5", "-8", "5:30") into a double representing hours.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to parse |
Returns
numeric offset in hours, or 0.0 if parsing fails
formatOffset()
static String
Formats a numeric offset as a signed string with one decimal place (e.g., "+5.5", "-0.5").
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
Returns
formatted offset string with sign
offsetToComponents()
static OffsetComponents
Converts a numeric offset into hours and minutes components and a sign indicator.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
formatGMT()
static String
Formats an offset string into a GMT representation like "GMT+5:30".
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to format |
Returns
GMT formatted offset string
isDSTActive()
static bool
Determines whether Daylight Saving Time is active for the given date and zone. Note: This is a simplified placeholder and always returns false; use a timezone library for production.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | date to check for DST |
zoneName |
String | timezone identifier (e.g., "America/New_York") |
Returns
true if DST is considered active (always false in this implementation)
applyDST()
static String
Applies a DST adjustment to the given offset string by adding one hour when isDST is true.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to adjust |
isDST |
bool | whether DST is active |
Returns
adjusted offset string (unchanged if isDST is false)
getOrdinal()
static String
Get ordinal suffix for a number (1st, 2nd, 3rd, 4th, etc.) Used for formatting house numbers and other ordinal displays
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getOrdinalSuffix()
static String
Get just the suffix without the number
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getMonthName()
static String
Get month name by number (1-12)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
getMonthNumber()
static int
Get month number by name (case-insensitive)
Parameters
| Name | Type | Description |
|---|---|---|
monthName |
String |
DateTimeComponents 41 methods date_utils.dart
Date and time components
Methods
parseTimeComprehensive()
static TimeComponents
Parse time string with comprehensive AM/PM support Handles: "14:30", "2:30 PM", "02:30:00" Returns hour in 24-hour format and minute Returns 12:00 (noon) as default if parsing fails
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
parseOffsetToMinutes()
static String
Parse timezone offset to minutes as string Handles: "UTC+01:00", "UTC-05:30", "+5.5", "-300", "300", "60.0" Returns offset in minutes as string (e.g., "-180" or "60")
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String |
formatTime12HourWithPeriod()
static String
Format time in 12-hour format with AM/PM period Example: formatTime12HourWithPeriod(14, 30) → "2:30 PM"
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int | |
minute |
int |
convertUtcToLocal()
static DateTime
Convert UTC DateTime to local timezone using offset in minutes. Returns a LOCAL DateTime object with the target's fields to prevent double-shifting when formatters or system properties call .toLocal().
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
file-level()
static DateTime?
Null-safe UTC to local conversion
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
_isUSLocale()
static bool
Determines if the current locale uses US date format (MM/DD/YYYY) vs EU (DD/MM/YYYY) US format: en_US, en_CA All others default to DD/MM/YYYY
formatDateLocale()
static String
Format date according to user's locale US: MM/DD/YYYY EU/other: DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
getLocaleDateFormat()
static DateFormat
Get localized DateFormat for display (not for API) US: 'MM/dd/yyyy' EU/other: 'dd/MM/yyyy'
getLocaleDateFormatHint()
static String
Get localized date picker format hint
getCurrentDateTime()
static DateTimeComponents
Get current date and time components
format12Hour()
static int
Format hour in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int |
file-level()
static DateTime?
Parse date string in format YYYY-MM-DD
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
file-level()
static TimeComponents?
Parse time string in format HH:MM
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
formatDate()
static String
Format date as MM/DD/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDateDDMMYYYY()
static String
Format date as DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTime12Hour()
static String
Format time in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour |
int | |
minute |
int |
getCurrentMonthYear()
static String
Get current month and year formatted
formatMonthYear()
static String
Format month and year (e.g., "January 2025")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Convert date and time components to DateTime
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? | |
timeStr |
String? |
formatDateWithSuffix()
static String
Format date with ordinal suffix (e.g., "Jan 5th", "Feb 22nd")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
static String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
file-level()
static String?
Format time if present (returns null if time is midnight)
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
file-level()
static DateTime?
Parse date from various formats
Parameters
| Name | Type | Description |
|---|---|---|
value |
dynamic |
formatDateForApi()
static String
Format date for API calls (MM/DD/YYYY) Used when sending dates to astrology calculation API NOTE: Always uses MM/DD/YYYY regardless of user locale
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTimeForApi()
static String
Format time for API calls (HH:MM in 24-hour format) Used when sending times to astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Parse date from API response (MM/DD/YYYY format) Used when receiving dates from astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
combineDateTime()
static DateTime
Combine date and time components into single DateTime
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
time |
TimeOfDay |
getCurrentDateForApi()
static String
Get current date formatted for API
getCurrentTimeForApi()
static String
Get current time formatted for API
formatDateTimeForApi()
static Map<String, String>
Format DateTime for API (combines date and time) Returns a map with 'date' and 'time' keys
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
getTimeOffset()
static String
Returns the provided offset string or the default value as a string when the offset is null or empty.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String? | nullable offset string |
defaultValue |
int | fallback integer value returned as string when offset is null/empty |
Returns
offset string or defaultValue as string
parseOffset()
static double
Parses a timezone offset string (e.g., "+5.5", "-8", "5:30") into a double representing hours.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to parse |
Returns
numeric offset in hours, or 0.0 if parsing fails
formatOffset()
static String
Formats a numeric offset as a signed string with one decimal place (e.g., "+5.5", "-0.5").
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
Returns
formatted offset string with sign
offsetToComponents()
static OffsetComponents
Converts a numeric offset into hours and minutes components and a sign indicator.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
formatGMT()
static String
Formats an offset string into a GMT representation like "GMT+5:30".
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to format |
Returns
GMT formatted offset string
isDSTActive()
static bool
Determines whether Daylight Saving Time is active for the given date and zone. Note: This is a simplified placeholder and always returns false; use a timezone library for production.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | date to check for DST |
zoneName |
String | timezone identifier (e.g., "America/New_York") |
Returns
true if DST is considered active (always false in this implementation)
applyDST()
static String
Applies a DST adjustment to the given offset string by adding one hour when isDST is true.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to adjust |
isDST |
bool | whether DST is active |
Returns
adjusted offset string (unchanged if isDST is false)
getOrdinal()
static String
Get ordinal suffix for a number (1st, 2nd, 3rd, 4th, etc.) Used for formatting house numbers and other ordinal displays
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getOrdinalSuffix()
static String
Get just the suffix without the number
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getMonthName()
static String
Get month name by number (1-12)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
getMonthNumber()
static int
Get month number by name (case-insensitive)
Parameters
| Name | Type | Description |
|---|---|---|
monthName |
String |
TimeComponents 41 methods date_utils.dart
Time components
Methods
parseTimeComprehensive()
static TimeComponents
Parse time string with comprehensive AM/PM support Handles: "14:30", "2:30 PM", "02:30:00" Returns hour in 24-hour format and minute Returns 12:00 (noon) as default if parsing fails
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
parseOffsetToMinutes()
static String
Parse timezone offset to minutes as string Handles: "UTC+01:00", "UTC-05:30", "+5.5", "-300", "300", "60.0" Returns offset in minutes as string (e.g., "-180" or "60")
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String |
formatTime12HourWithPeriod()
static String
Format time in 12-hour format with AM/PM period Example: formatTime12HourWithPeriod(14, 30) → "2:30 PM"
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int | |
minute |
int |
convertUtcToLocal()
static DateTime
Convert UTC DateTime to local timezone using offset in minutes. Returns a LOCAL DateTime object with the target's fields to prevent double-shifting when formatters or system properties call .toLocal().
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
file-level()
static DateTime?
Null-safe UTC to local conversion
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
_isUSLocale()
static bool
Determines if the current locale uses US date format (MM/DD/YYYY) vs EU (DD/MM/YYYY) US format: en_US, en_CA All others default to DD/MM/YYYY
formatDateLocale()
static String
Format date according to user's locale US: MM/DD/YYYY EU/other: DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
getLocaleDateFormat()
static DateFormat
Get localized DateFormat for display (not for API) US: 'MM/dd/yyyy' EU/other: 'dd/MM/yyyy'
getLocaleDateFormatHint()
static String
Get localized date picker format hint
getCurrentDateTime()
static DateTimeComponents
Get current date and time components
format12Hour()
static int
Format hour in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int |
file-level()
static DateTime?
Parse date string in format YYYY-MM-DD
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
file-level()
static TimeComponents?
Parse time string in format HH:MM
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
formatDate()
static String
Format date as MM/DD/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDateDDMMYYYY()
static String
Format date as DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTime12Hour()
static String
Format time in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour |
int | |
minute |
int |
getCurrentMonthYear()
static String
Get current month and year formatted
formatMonthYear()
static String
Format month and year (e.g., "January 2025")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Convert date and time components to DateTime
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? | |
timeStr |
String? |
formatDateWithSuffix()
static String
Format date with ordinal suffix (e.g., "Jan 5th", "Feb 22nd")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
static String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
file-level()
static String?
Format time if present (returns null if time is midnight)
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
file-level()
static DateTime?
Parse date from various formats
Parameters
| Name | Type | Description |
|---|---|---|
value |
dynamic |
formatDateForApi()
static String
Format date for API calls (MM/DD/YYYY) Used when sending dates to astrology calculation API NOTE: Always uses MM/DD/YYYY regardless of user locale
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTimeForApi()
static String
Format time for API calls (HH:MM in 24-hour format) Used when sending times to astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Parse date from API response (MM/DD/YYYY format) Used when receiving dates from astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
combineDateTime()
static DateTime
Combine date and time components into single DateTime
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
time |
TimeOfDay |
getCurrentDateForApi()
static String
Get current date formatted for API
getCurrentTimeForApi()
static String
Get current time formatted for API
formatDateTimeForApi()
static Map<String, String>
Format DateTime for API (combines date and time) Returns a map with 'date' and 'time' keys
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
getTimeOffset()
static String
Returns the provided offset string or the default value as a string when the offset is null or empty.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String? | nullable offset string |
defaultValue |
int | fallback integer value returned as string when offset is null/empty |
Returns
offset string or defaultValue as string
parseOffset()
static double
Parses a timezone offset string (e.g., "+5.5", "-8", "5:30") into a double representing hours.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to parse |
Returns
numeric offset in hours, or 0.0 if parsing fails
formatOffset()
static String
Formats a numeric offset as a signed string with one decimal place (e.g., "+5.5", "-0.5").
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
Returns
formatted offset string with sign
offsetToComponents()
static OffsetComponents
Converts a numeric offset into hours and minutes components and a sign indicator.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
formatGMT()
static String
Formats an offset string into a GMT representation like "GMT+5:30".
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to format |
Returns
GMT formatted offset string
isDSTActive()
static bool
Determines whether Daylight Saving Time is active for the given date and zone. Note: This is a simplified placeholder and always returns false; use a timezone library for production.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | date to check for DST |
zoneName |
String | timezone identifier (e.g., "America/New_York") |
Returns
true if DST is considered active (always false in this implementation)
applyDST()
static String
Applies a DST adjustment to the given offset string by adding one hour when isDST is true.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to adjust |
isDST |
bool | whether DST is active |
Returns
adjusted offset string (unchanged if isDST is false)
getOrdinal()
static String
Get ordinal suffix for a number (1st, 2nd, 3rd, 4th, etc.) Used for formatting house numbers and other ordinal displays
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getOrdinalSuffix()
static String
Get just the suffix without the number
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getMonthName()
static String
Get month name by number (1-12)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
getMonthNumber()
static int
Get month number by name (case-insensitive)
Parameters
| Name | Type | Description |
|---|---|---|
monthName |
String |
OffsetComponents 41 methods date_utils.dart
Data class representing hours and minutes components of a timezone offset.
Methods
parseTimeComprehensive()
static TimeComponents
Parse time string with comprehensive AM/PM support Handles: "14:30", "2:30 PM", "02:30:00" Returns hour in 24-hour format and minute Returns 12:00 (noon) as default if parsing fails
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
parseOffsetToMinutes()
static String
Parse timezone offset to minutes as string Handles: "UTC+01:00", "UTC-05:30", "+5.5", "-300", "300", "60.0" Returns offset in minutes as string (e.g., "-180" or "60")
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String |
formatTime12HourWithPeriod()
static String
Format time in 12-hour format with AM/PM period Example: formatTime12HourWithPeriod(14, 30) → "2:30 PM"
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int | |
minute |
int |
convertUtcToLocal()
static DateTime
Convert UTC DateTime to local timezone using offset in minutes. Returns a LOCAL DateTime object with the target's fields to prevent double-shifting when formatters or system properties call .toLocal().
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
file-level()
static DateTime?
Null-safe UTC to local conversion
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
_isUSLocale()
static bool
Determines if the current locale uses US date format (MM/DD/YYYY) vs EU (DD/MM/YYYY) US format: en_US, en_CA All others default to DD/MM/YYYY
formatDateLocale()
static String
Format date according to user's locale US: MM/DD/YYYY EU/other: DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
getLocaleDateFormat()
static DateFormat
Get localized DateFormat for display (not for API) US: 'MM/dd/yyyy' EU/other: 'dd/MM/yyyy'
getLocaleDateFormatHint()
static String
Get localized date picker format hint
getCurrentDateTime()
static DateTimeComponents
Get current date and time components
format12Hour()
static int
Format hour in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int |
file-level()
static DateTime?
Parse date string in format YYYY-MM-DD
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
file-level()
static TimeComponents?
Parse time string in format HH:MM
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
formatDate()
static String
Format date as MM/DD/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDateDDMMYYYY()
static String
Format date as DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTime12Hour()
static String
Format time in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour |
int | |
minute |
int |
getCurrentMonthYear()
static String
Get current month and year formatted
formatMonthYear()
static String
Format month and year (e.g., "January 2025")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Convert date and time components to DateTime
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? | |
timeStr |
String? |
formatDateWithSuffix()
static String
Format date with ordinal suffix (e.g., "Jan 5th", "Feb 22nd")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
static String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
file-level()
static String?
Format time if present (returns null if time is midnight)
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
file-level()
static DateTime?
Parse date from various formats
Parameters
| Name | Type | Description |
|---|---|---|
value |
dynamic |
formatDateForApi()
static String
Format date for API calls (MM/DD/YYYY) Used when sending dates to astrology calculation API NOTE: Always uses MM/DD/YYYY regardless of user locale
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTimeForApi()
static String
Format time for API calls (HH:MM in 24-hour format) Used when sending times to astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Parse date from API response (MM/DD/YYYY format) Used when receiving dates from astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
combineDateTime()
static DateTime
Combine date and time components into single DateTime
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
time |
TimeOfDay |
getCurrentDateForApi()
static String
Get current date formatted for API
getCurrentTimeForApi()
static String
Get current time formatted for API
formatDateTimeForApi()
static Map<String, String>
Format DateTime for API (combines date and time) Returns a map with 'date' and 'time' keys
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
getTimeOffset()
static String
Returns the provided offset string or the default value as a string when the offset is null or empty.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String? | nullable offset string |
defaultValue |
int | fallback integer value returned as string when offset is null/empty |
Returns
offset string or defaultValue as string
parseOffset()
static double
Parses a timezone offset string (e.g., "+5.5", "-8", "5:30") into a double representing hours.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to parse |
Returns
numeric offset in hours, or 0.0 if parsing fails
formatOffset()
static String
Formats a numeric offset as a signed string with one decimal place (e.g., "+5.5", "-0.5").
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
Returns
formatted offset string with sign
offsetToComponents()
static OffsetComponents
Converts a numeric offset into hours and minutes components and a sign indicator.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
formatGMT()
static String
Formats an offset string into a GMT representation like "GMT+5:30".
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to format |
Returns
GMT formatted offset string
isDSTActive()
static bool
Determines whether Daylight Saving Time is active for the given date and zone. Note: This is a simplified placeholder and always returns false; use a timezone library for production.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | date to check for DST |
zoneName |
String | timezone identifier (e.g., "America/New_York") |
Returns
true if DST is considered active (always false in this implementation)
applyDST()
static String
Applies a DST adjustment to the given offset string by adding one hour when isDST is true.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to adjust |
isDST |
bool | whether DST is active |
Returns
adjusted offset string (unchanged if isDST is false)
getOrdinal()
static String
Get ordinal suffix for a number (1st, 2nd, 3rd, 4th, etc.) Used for formatting house numbers and other ordinal displays
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getOrdinalSuffix()
static String
Get just the suffix without the number
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getMonthName()
static String
Get month name by number (1-12)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
getMonthNumber()
static int
Get month number by name (case-insensitive)
Parameters
| Name | Type | Description |
|---|---|---|
monthName |
String |
MonthConstants 41 methods date_utils.dart
Constants for month names and related utilities
Methods
parseTimeComprehensive()
static TimeComponents
Parse time string with comprehensive AM/PM support Handles: "14:30", "2:30 PM", "02:30:00" Returns hour in 24-hour format and minute Returns 12:00 (noon) as default if parsing fails
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
parseOffsetToMinutes()
static String
Parse timezone offset to minutes as string Handles: "UTC+01:00", "UTC-05:30", "+5.5", "-300", "300", "60.0" Returns offset in minutes as string (e.g., "-180" or "60")
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String |
formatTime12HourWithPeriod()
static String
Format time in 12-hour format with AM/PM period Example: formatTime12HourWithPeriod(14, 30) → "2:30 PM"
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int | |
minute |
int |
convertUtcToLocal()
static DateTime
Convert UTC DateTime to local timezone using offset in minutes. Returns a LOCAL DateTime object with the target's fields to prevent double-shifting when formatters or system properties call .toLocal().
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
file-level()
static DateTime?
Null-safe UTC to local conversion
Parameters
| Name | Type | Description |
|---|---|---|
utcDate |
DateTime | |
offsetMinutes |
int |
_isUSLocale()
static bool
Determines if the current locale uses US date format (MM/DD/YYYY) vs EU (DD/MM/YYYY) US format: en_US, en_CA All others default to DD/MM/YYYY
formatDateLocale()
static String
Format date according to user's locale US: MM/DD/YYYY EU/other: DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
getLocaleDateFormat()
static DateFormat
Get localized DateFormat for display (not for API) US: 'MM/dd/yyyy' EU/other: 'dd/MM/yyyy'
getLocaleDateFormatHint()
static String
Get localized date picker format hint
getCurrentDateTime()
static DateTimeComponents
Get current date and time components
format12Hour()
static int
Format hour in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour24 |
int |
file-level()
static DateTime?
Parse date string in format YYYY-MM-DD
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
file-level()
static TimeComponents?
Parse time string in format HH:MM
Parameters
| Name | Type | Description |
|---|---|---|
timeStr |
String? |
formatDate()
static String
Format date as MM/DD/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatDateDDMMYYYY()
static String
Format date as DD/MM/YYYY
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTime12Hour()
static String
Format time in 12-hour format
Parameters
| Name | Type | Description |
|---|---|---|
hour |
int | |
minute |
int |
getCurrentMonthYear()
static String
Get current month and year formatted
formatMonthYear()
static String
Format month and year (e.g., "January 2025")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Convert date and time components to DateTime
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? | |
timeStr |
String? |
formatDateWithSuffix()
static String
Format date with ordinal suffix (e.g., "Jan 5th", "Feb 22nd")
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
_getDaySuffix()
static String
Get day suffix (st, nd, rd, th)
Parameters
| Name | Type | Description |
|---|---|---|
day |
int |
file-level()
static String?
Format time if present (returns null if time is midnight)
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
file-level()
static DateTime?
Parse date from various formats
Parameters
| Name | Type | Description |
|---|---|---|
value |
dynamic |
formatDateForApi()
static String
Format date for API calls (MM/DD/YYYY) Used when sending dates to astrology calculation API NOTE: Always uses MM/DD/YYYY regardless of user locale
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
formatTimeForApi()
static String
Format time for API calls (HH:MM in 24-hour format) Used when sending times to astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime |
file-level()
static DateTime?
Parse date from API response (MM/DD/YYYY format) Used when receiving dates from astrology calculation API
Parameters
| Name | Type | Description |
|---|---|---|
dateStr |
String? |
combineDateTime()
static DateTime
Combine date and time components into single DateTime
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | |
time |
TimeOfDay |
getCurrentDateForApi()
static String
Get current date formatted for API
getCurrentTimeForApi()
static String
Get current time formatted for API
formatDateTimeForApi()
static Map<String, String>
Format DateTime for API (combines date and time) Returns a map with 'date' and 'time' keys
Parameters
| Name | Type | Description |
|---|---|---|
dateTime |
DateTime |
getTimeOffset()
static String
Returns the provided offset string or the default value as a string when the offset is null or empty.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String? | nullable offset string |
defaultValue |
int | fallback integer value returned as string when offset is null/empty |
Returns
offset string or defaultValue as string
parseOffset()
static double
Parses a timezone offset string (e.g., "+5.5", "-8", "5:30") into a double representing hours.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to parse |
Returns
numeric offset in hours, or 0.0 if parsing fails
formatOffset()
static String
Formats a numeric offset as a signed string with one decimal place (e.g., "+5.5", "-0.5").
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
Returns
formatted offset string with sign
offsetToComponents()
static OffsetComponents
Converts a numeric offset into hours and minutes components and a sign indicator.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
double | numeric offset in hours |
formatGMT()
static String
Formats an offset string into a GMT representation like "GMT+5:30".
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to format |
Returns
GMT formatted offset string
isDSTActive()
static bool
Determines whether Daylight Saving Time is active for the given date and zone. Note: This is a simplified placeholder and always returns false; use a timezone library for production.
Parameters
| Name | Type | Description |
|---|---|---|
date |
DateTime | date to check for DST |
zoneName |
String | timezone identifier (e.g., "America/New_York") |
Returns
true if DST is considered active (always false in this implementation)
applyDST()
static String
Applies a DST adjustment to the given offset string by adding one hour when isDST is true.
Parameters
| Name | Type | Description |
|---|---|---|
offset |
String | offset string to adjust |
isDST |
bool | whether DST is active |
Returns
adjusted offset string (unchanged if isDST is false)
getOrdinal()
static String
Get ordinal suffix for a number (1st, 2nd, 3rd, 4th, etc.) Used for formatting house numbers and other ordinal displays
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getOrdinalSuffix()
static String
Get just the suffix without the number
Parameters
| Name | Type | Description |
|---|---|---|
number |
int |
getMonthName()
static String
Get month name by number (1-12)
Parameters
| Name | Type | Description |
|---|---|---|
month |
int |
getMonthNumber()
static int
Get month number by name (case-insensitive)
Parameters
| Name | Type | Description |
|---|---|---|
monthName |
String |
SystemNotifier 3 methods system_notifier.dart
A global notifier for system-level feedback (network issues, server errors, etc.) Automatically adapts to light/dark mode and supports both Snack + Dialog modes.
Methods
showGlobalFeedback()
static Future<void>
Unified feedback entry point that displays a translated message as a SnackBar or Dialog.
Returns
A Future that completes when a dialog is dismissed or snackbar is queued.
Side Effects
May show a SnackBar or present a Dialog.
_showSnack()
static void
Internal helper that clears existing SnackBars and shows a new SnackBar via the global messenger.
Parameters
| Name | Type | Description |
|---|---|---|
message |
String | Translated message text to display. |
type |
SnackType | Severity type used to build the Snack UI. |
Side Effects
Clears existing SnackBars and enqueues a new one.
_showDialog()
static Future<void>
Internal helper that presents an AlertDialog using the provided BuildContext with icon and title derived from [type].
Returns
A Future that completes when the dialog is dismissed.
Side Effects
Pushes a dialog route onto the Navigator.
UrlLauncherHelper 2 methods url_launcher_helper.dart
Helper to handle all external URL launching with strict whitelisting. This prevents Google Play "Device and Network Abuse" violations by ensuring the app doesn't accidentally launch a URL that could lead to an external APK download.
Methods
mode()
static Future<void>
Launches a URL only if it's considered safe.
Parameters
| Name | Type | Description |
|---|---|---|
uri |
Uri | |
mode |
LaunchMode |
isSafe()
static bool
Checks if a URL is safe to launch based on scheme, host, and file extension.
Parameters
| Name | Type | Description |
|---|---|---|
uri |
Uri |
ENUMS
ReportType app_constants.dart
Enumeration of supported report types for generating astrological reports. Use ReportType to select the kind of calculation or report generation.
Values
nameRequireddateTimeRequiredlocationRequiredchartErrordeleteProfileConfirmdeleteHistoryConfirmclearHistoryConfirmlocationErrorreportError
LocationType app_constants.dart
Enumeration for location context used in forms and API calls.
Values
nameRequireddateTimeRequiredlocationRequiredchartErrordeleteProfileConfirmdeleteHistoryConfirmclearHistoryConfirmlocationErrorreportError
ChartType chart_payload.dart
Enumeration of chart types supported by the application and their JSON string mappings. Purpose: - Represents the type of astrological chart being requested or processed.
Used By Services
- ChartService.getChartTypeLabel() chart_service.dart
- ChartService.getChartCategory() chart_service.dart
- ChartService._isSelfComparisonChart() chart_service.dart
- ChartService.getChartTitles() chart_service.dart
- ChartService.shouldShowTransits() chart_service.dart
- ChartService.shouldShowHouses() chart_service.dart
- ChartService.shouldShowDeclinations() chart_service.dart
- ChartService.needsSecondUser() chart_service.dart
- HoroscopeService.chartType() horoscope_service.dart
- ReportService report_service.dart
Used By Widgets
- ChartScreen chart_screen.dart
- _KeepAlivePage chart_screen.dart
Used By Functions
- syncChartToMatrix view_sync_helper.dart
LocationType location_service.dart
Location type enumeration
Values
_searchDebounceDuration
SnackType feedback.dart
Different categories of feedback messages
Values
defaultSnackDurationsnackBarWideLayoutBreakpoint
InfoRowLayout form_controls.dart
Display-only information row with label and value. Use for read-only information display.
Values
tightMultilinedropdownMaxWidthvalueLabelouterPaddingmodalHeightFractionmodalWidthFractionOnWidemodalWideBreakpointShortestSideblurSigmacompactleadingIconSizeiconWidget
ButtonType ui_components.dart
Semantic variants for AppButton to select visual style and intent.
Values
opacitytrailingIcontrailingIconSizewidthverticalPadding
SymbolType astro_helper.dart
Symbol type for buildSymbolImage
_ProfileSectionTab profile_screen.dart
=============================================================== PROFILE SCREEN =============================================================== Identity-focused: who (profile header, user management). Entry point to Account (entitlements) via link. Profile = who (identity) Routes: - Manage Users -> /chartpickuser - Add User -> /profiles - Account -> /account
Values
_guestUserStorageKey
IconPattern astrology_guide_tabs.dart
Icon pattern for category items (from astrology_guide.dart)
HeaderDateStepUnit user_header.dart
=============================================================== USER HEADER CONFIGURATION =============================================================== Auto-configures what to show based on chart/matrix type
Values
_globalHeaderCollapsed_userHeaderOtherFontScaleconfig
JournalLayoutMode journal_widgets.dart
Generic journal list widget for Reports and Content Matches _JournalList.html structure
PlanetaryHoursLayout planetary_hours_widget.dart
Layout style for planetary hours list
FUNCTIONS
loadMoonImageFromAssets() MoonImageHelper.java
Load a moon image from app_assets by extracting the image number from URL Example: "https://astromatrix.app/symbols/moon-17.gif" -> loads "moon_images/moon_17.png"
Parameters
| Name | Type |
|---|---|
context |
Context |
imageUrl |
String |
Returns
public static Bitmap
Returns: Bitmap
extractFileName() MoonImageHelper.java
Extract filename from URL and convert to asset name "https://astromatrix.app/symbols/moon-17.gif" -> "moon_17.png" "https://astromatrix.app/symbols/moon-0.png" -> "moon_0.png"
Parameters
| Name | Type |
|---|---|
imageUrl |
String |
Returns
private static String
resizeBitmap() MoonImageHelper.java
Resize bitmap to save memory
Parameters
| Name | Type |
|---|---|
bitmap |
Bitmap |
width |
int |
height |
int |
Returns
private static Bitmap
Returns: Bitmap
loadLocalImage() MoonWidget.java
✅ NEW: Load image from local app_assets instead of SharedPreferences cache
Parameters
| Name | Type |
|---|---|
context |
Context |
remoteViews |
RemoteViews |
imageUrl |
String |
imageViewId |
int |
Returns
private void
loadLocalImageSync() MoonWidget.java
✅ NEW: Load image from local app_assets synchronously Replaces the old downloadAndCacheImage method
Parameters
| Name | Type |
|---|---|
context |
Context |
remoteViews |
RemoteViews |
imageUrl |
String |
imageViewId |
int |
Returns
private static void
schedulePeriodicWork() MoonWidgetScheduler.java
Schedule periodic work to update the widget every 15 minutes
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
public static void
cancelPeriodicWork() MoonWidgetScheduler.java
Cancel periodic work when widget is disabled
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
public static void
shouldFetchNewData() MoonWidgetWorker.java
Check if we should fetch new data based on last update time
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
private boolean
notifyDataChanged() PlanetaryWidget.java
Notify all widgets that data has changed
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
private void
shouldFetchNewData() PlanetaryWidget.java
Check if we should fetch new data (minimum 1 hour interval)
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
private boolean
schedulePeriodicWork() PlanetaryWidgetScheduler.java
Schedule periodic work to check for updates every 15 minutes (Actual API calls are rate-limited to 15 minutes inside the worker)
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
public static void
cancelPeriodicWork() PlanetaryWidgetScheduler.java
Cancel periodic work when widget is disabled
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
public static void
loadPlanetaryData() PlanetaryWidgetService.java
Load planetary data from SharedPreferences cache
Returns
private void
formatTo12HourTime() PlanetaryWidgetService.java
Format UTC time string to 12-hour local time
Parameters
| Name | Type |
|---|---|
utcTime |
String |
Returns
private String
isCurrentTimeInRange() PlanetaryWidgetService.java
Check if current time is within the given UTC time range
Parameters
| Name | Type |
|---|---|
startTime |
String |
endTime |
String |
Returns
private boolean
loadBitmapAsync() PlanetaryWidgetService.java
Load bitmap asynchronously
Parameters
| Name | Type |
|---|---|
url |
String |
callback |
BitmapCallback |
Returns
private void
shouldFetchNewData() PlanetaryWidgetWorker.java
Check if we should fetch new data (15 minutes interval)
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
private boolean
scheduleExactUpdate() PlanetaryWidgetWorker.java
Schedule update at exact planetary hour change
Parameters
| Name | Type |
|---|---|
context |
Context |
startTime |
String |
Returns
public static void
updateWidgetFromCache() PlanetaryWidgetWorker.java
Update widget from cached data (no API call)
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
public static void
fetchPlanetaryData() PlanetaryWidgetWorker.java
Fetch planetary data from API (called only when needed - every 15 minutes)
Parameters
| Name | Type |
|---|---|
context |
Context |
Returns
public static void
findNextPlanetaryHourStart() PlanetaryWidgetWorker.java
Find the next planetary hour start time
Parameters
| Name | Type |
|---|---|
planetHours |
PlanetHour |
Returns
private static String
getClient() SabianWidget.java
Returns the singleton instance of RBApiInterface.
Returns
public static RBApiInterface
Returns: RBApiInterface
isValidAsync() affiliate_code_config.dart
Check if a code is valid (case-insensitive) Verifies the code against the backend via the /affiliate/getAffiliateCodes endpoint
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
static Future<bool>
isValid() affiliate_code_config.dart
DEPRECATED: Use isValidAsync for dynamic verification
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
static bool
file-level() affiliate_code_config.dart
Get the discount percentage for a code (if applicable) Returns null if code doesn't have a specific discount
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
static int?
getDiscountMessage() affiliate_code_config.dart
Get a user-friendly message for the discount
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
static String
getViewLimitForSession() content_gating_config.dart
Get the view limit for a given session count Returns the appropriate limit based on progressive tightening
Parameters
| Name | Type |
|---|---|
sessionCount |
int |
Returns
static int
sanitizeAssetUrl() network_path.dart
Centralized sanitization for legacy asset URLs. Redirects https://astromatrix.app/assets/ to https://retro.astromatrix.app/assets/
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
static String
attachUriLinkStreamEarly() deep_link_service_mobile.dart
Subscribe to [AppLinks.uriLinkStream] as soon as the native shell is running. Without this, the stream is only attached from [initialize] after the legacy WebView screen finishes loading — so new-UI (Flutter-first) users never receive links while the app is already open (native still logs "Handled intent").
Returns
void
initialize() deep_link_service_mobile.dart
Initialize the deep link service
Returns
Future<void>
_checkPendingAffiliateDiscount() deep_link_service_mobile.dart
🆕 Check if there's a pending affiliate discount from install Loads a pending flag from SharedPreferences and, if present, validates and applies the affiliate code.
Returns
Future<void>
_initDeepLinks() deep_link_service_mobile.dart
Initialize deep links
Returns
Future<void>
_handleAffiliateLink() deep_link_service_mobile.dart
Handle incoming deep links
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
Future<void>
_handleAffiliateLink() deep_link_service_mobile.dart
Handle affiliate discount links
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
Future<void>
loadAffiliateCode() deep_link_service_mobile.dart
Load affiliate code from SharedPreferences
Returns
Future<void>
_saveAffiliateCode() deep_link_service_mobile.dart
Save affiliate code to SharedPreferences
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
Future<void>
_validateAffiliateCode() deep_link_service_mobile.dart
Validate affiliate code
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
Future<bool>
_notifyWebViewDiscountApplied() deep_link_service_mobile.dart
Notify web view about discount applied
Returns
void
updateUserInfo() deep_link_service_mobile.dart
Update user and device info
Parameters
| Name | Type |
|---|---|
userId |
String? |
deviceInfoId |
String? |
Returns
void
dispose() deep_link_service_mobile.dart
Dispose resources
Returns
void
call() local_api_bridge_mobile.dart
Unified GET/POST mimic API call
Returns
static Map<String, dynamic>
file-level() translation_debug_log_io.dart
Best-effort path to the user Documents folder (macOS/Linux/Windows).
Returns
String?
translationDebugAppend() translation_debug_log_stub.dart
Stub: no file / storage (unsupported platform).
Returns
void
translationDebugFlush() translation_debug_log_web.dart
Web cannot write to ~/Documents. Persists to [localStorage] and triggers a **download** (usually to your Downloads folder) when [reason] is `language_changed`.
Parameters
| Name | Type |
|---|---|
reason |
String? |
Returns
void
setupServiceLocator() service_locator.dart
Initializes storage and registers core application services into the GetIt locator.
Returns
Future<void>
Description
Future<void> that completes when initialization and registrations are finished.
resetServiceLocator() service_locator.dart
Unregisters all services from the global GetIt instance and resets the dependency injection state.
Returns
Future<void>
Description
Future<void> that completes when the reset is finished.
hasTag() video.dart
Check if video has a specific tag (case-insensitive)
Parameters
| Name | Type |
|---|---|
tagName |
String |
Returns
bool
_runAcgIsolate() astrocartography_service.dart
Top-level function required by compute().
Parameters
| Name | Type |
|---|---|
payload |
_IsolatePayload |
Returns
_IsolateResult
preloadDailyData() daily_preload_service.dart
Preload Daily page data in the background Safe to call multiple times - will only preload once
Returns
Future<void>
thoroughPreload() daily_preload_service.dart
Thorough preload for secondary systems (Ads config, Tarot spreads, In-house ads) This should be called later (e.g. 8-10s after startup) to avoid competing with main content.
Returns
Future<void>
getJournalsByCategory() journal_service.dart
Get journals by category (Tarot, Reports, Content)
Returns
static Future<List<JournalEntry>>
Returns: JournalEntry
getTarotJournals() journal_service.dart
Get tarot reading journals with timeframe filtering Uses the Node.js journals API with type filter
Returns
static Future<List<JournalEntry>>
Returns: JournalEntry
getReadingHistory() journal_service.dart
Get tarot reading history from the Utility API. Uses GET /API/Utility/GetTarotJournals
Returns
static Future<List<JournalEntry>>
Returns: JournalEntry
addReadingJournal() journal_service.dart
Add a tarot reading journal via the Utility API. Uses POST /API/Utility/AddTarotJournal
Returns
static Future<bool>
removeReadingJournal() journal_service.dart
Remove a tarot reading journal via the Utility API. Uses POST /API/Utility/RemoveJournal
Returns
static Future<bool>
updateReadingJournal() journal_service.dart
Update a tarot reading journal (title/comment) via the Utility API. Uses PUT /journals/{TarotReadingJournalID}
Returns
static Future<bool>
updateReadingJournalInExistingCache() journal_service.dart
Best-effort local fallback for reading edits when API fails. This only updates cache keys that already exist; it does not create a new cache footprint for users with caching disabled/empty.
Returns
static Future<bool>
getTarotStats() journal_service.dart
Get tarot statistics (TopCards, Suits, Number)
Uses Models
getTarotCards() journal_service.dart
Get tarot cards for a specific reading
Uses Models
removeJournal() journal_service.dart
Remove a journal entry
Returns
static Future<bool>
updateJournalComment() journal_service.dart
Update journal comment
Returns
static Future<bool>
updateJournalEntry() journal_service.dart
Update report/content/chart journal metadata (title/comment) via Node API.
Returns
static Future<bool>
updateJournalEntryInExistingCache() journal_service.dart
Best-effort local cache patch for non-tarot journal edits when API fails. Updates only existing category caches; no new cache keys are created.
Returns
static Future<bool>
addTarotJournal() journal_service.dart
Add a tarot journal entry
Returns
static Future<bool>
getTarotSpreads() journal_service.dart
clearAllCaches() journal_service.dart
Clear all journal caches (useful for logout or data refresh)
Returns
static Future<void>
getJournalIdForComponent() journal_service.dart
Check if a component is saved in journal and return its journal ID if found Returns null if not saved, or the journal ID if saved
Returns
static Future<String?>
buildComponentDeeplink() journal_service.dart
Build a deeplink route string for a component. Returns a route like: /component?component=Sun+in+Cancer&category=Zodiac+Planets This deeplink can be used by HybridRouter.navigate() to reopen the view.
Returns
static String
buildChartDeeplink() journal_service.dart
Build a deeplink route string for a chart view. Returns a route like: /chartview?type=birth
Returns
static String
buildMatrixDeeplink() journal_service.dart
Build a deeplink for a matrix view.
Returns
static String
addDeeplinkJournal() journal_service.dart
Add a journal entry as a deeplink reference. Instead of duplicating full content, this saves: - `deeplink`: the route to reopen the view (e.g., `/component?component=...`) - `title`, `image`, `type`: minimal display metadata for the journal list When the user taps a journal entry, the app opens the deeplink which re-fetches and renders the original view with full context.
Returns
static Future<Map<String, dynamic>?>
enableCache() journal_service.dart
Disable caching temporarily
Returns
static void
enableCache() journal_service.dart
Enable caching
Returns
static void
addChartReportJournal() journal_service.dart
Add chart-based report to journal as a deeplink. Instead of saving the full report JSON, saves a deeplink to the chart view — e.g., `/chartview?type=birth`. When reopened, the chart recalculates from the current data.
Returns
static Future<bool>
_getChartImageUrl() journal_service.dart
Get image URL for chart type
Parameters
| Name | Type |
|---|---|
journalType |
String |
Returns
static String
addDataReportJournal() journal_service.dart
Add data-driven report to journal as a deeplink. For Matrix, Tarot (non-spread), and other data-driven reports. Saves a deeplink to the matrix view instead of duplicating content.
Returns
static Future<bool>
_getChartJournalType() journal_service.dart
Get journal type string based on chart type
Parameters
| Name | Type |
|---|---|
chartType |
String |
Returns
static String
_buildChartReportTitle() journal_service.dart
Build journal title for chart reports
Returns
static String
_sanitizeData() journal_service.dart
Recursively removes or replaces non-encodable values like NaN or Infinity which cause jsonEncode to crash.
Parameters
| Name | Type |
|---|---|
data |
dynamic |
Returns
static dynamic
isSelfMatrixFullSummary() matrix_service.dart
Whether [value] is the self-matrix “show everything” state (not a menu pick).
Parameters
| Name | Type |
|---|---|
value |
String? |
Returns
static bool
resolveSelfChartFilter() matrix_service.dart
Resolves filter for [filterItems] / summary (null → full summary).
Parameters
| Name | Type |
|---|---|
raw |
String? |
Returns
static String
normalizeSelfReportFilter() matrix_service.dart
Maps legacy/deep-link / menu values to a supported self-matrix report filter.
Parameters
| Name | Type |
|---|---|
raw |
String? |
Returns
static String
formatMatrixDate() matrix_service.dart
Centralized matrix date formatter for start/end ranges. Rules: - Active window -> "Ends on <end date>" - Future/Past with same current year -> "Mon D – Mon D" - Different years -> show year on both - Same non-current year -> year shown once on the end date
Parameters
| Name | Type |
|---|---|
startDate |
DateTime |
endDate |
DateTime |
offsetMinutes |
int? |
Returns
static String
formatMatrixSingleDate() matrix_service.dart
Centralized single-date formatter used by matrix cards. Examples: - `Apr 5` (showYear: false) - `Apr 5, 2026` (showYear: true)
Returns
static String
formatMatrixReadableSingleDate() matrix_service.dart
Readable single date for forecast/calendar lists. Uses 3-letter months and puts year on a new line when shown.
Returns
static String
formatMatrixReadableDateRange() matrix_service.dart
Readable date range for calendar lists. Uses 3-letter months and, when a year is relevant, places the year(s) on a new line to keep the date column right-aligned and scannable.
Parameters
| Name | Type |
|---|---|
start |
DateTime |
end |
DateTime |
Returns
static String
formatMatrixSingleDateRange() matrix_service.dart
Abbreviated range for tighter layouts, e.g. `May 17th to Jun 1st`.
Parameters
| Name | Type |
|---|---|
start |
DateTime |
end |
DateTime |
Returns
static String
isValidFacet() matrix_service.dart
Check if a facet string is a valid facet key or value driven entirely by the existing facet mapping systems.
Parameters
| Name | Type |
|---|---|
facet |
String? |
Returns
static bool
_transformData() matrix_service.dart
Fast inline transform - uses centralized enrichment from astro_parser
Uses Models
Parameters
| Name | Type |
|---|---|
data |
Map<String, dynamic> |
facetMapping |
Map<String, String> |
_matrixItemDedupKey() matrix_service.dart
Dedup key that preserves chart-type/category variants. Web parity: rows that share component/facet text but belong to different chart streams (e.g. birth vs transit weekly/monthly) must NOT collapse into one entry before chart-type filters run.
Uses Models
Parameters
| Name | Type |
|---|---|
item |
MatrixItem |
Returns
String
_isWeeklyPlanetItem() matrix_service.dart
Check if item involves a weekly planet (Sun, Moon, Mercury, Venus, Mars)
Uses Models
Parameters
| Name | Type |
|---|---|
item |
MatrixItem |
Returns
static bool
_isMonthlyPlanetItem() matrix_service.dart
Check if item involves a monthly/slow planet (anything other than personal)
Uses Models
Parameters
| Name | Type |
|---|---|
item |
MatrixItem |
Returns
static bool
_matchesSelfChartTypeFilter() matrix_service.dart
Whether [item] matches a single self-matrix report filter value.
Uses Models
Parameters
| Name | Type |
|---|---|
item |
MatrixItem |
chartTypeFilter |
String |
Returns
bool
calculateFilteredAttributes() matrix_service.dart
Calculate attributes for filtered items
Returns
Map<String, MatrixAttribute>
Returns: MatrixAttribute
classifyItemPolarity() matrix_service.dart
Classify a matrix item as positive/negative/neutral for tallying. Rules: - Blue/green style items count positive (harmonious aspects + positive hash cues) - Sesquiquadrates, squares, and oppositions count negative - Unknown items are neutral (only affect total)
Uses Models
Parameters
| Name | Type |
|---|---|
item |
MatrixItem |
Returns
MatrixItemPolarity
Returns: MatrixItemPolarity
getPolarityCounts() matrix_service.dart
Aggregate polarity counts for any set of already-filtered matrix items.
Uses Models
Parameters
| Name | Type |
|---|---|
items |
MatrixItem |
Returns
MatrixPolarityCounts
Returns: MatrixPolarityCounts
getSummaryAttributes() matrix_service.dart
Get summary data for all facets with optional chart type filter
Returns
Map<String, MatrixAttribute>
Returns: MatrixAttribute
getSortedSummary() matrix_service.dart
Get sorted facet list for summary view
Returns
List<MapEntry<String, MatrixAttribute>>
Returns: MapEntry, MatrixAttribute
getFacetNames() matrix_service.dart
Get list of facet names for the current matrix type
Parameters
| Name | Type |
|---|---|
type |
MatrixType |
Returns
List<String>
start() screen_timer_service.dart
Start timer for a screen
Parameters
| Name | Type |
|---|---|
screenName |
String |
Returns
void
stop() screen_timer_service.dart
Stop timer for a screen and report metrics
Parameters
| Name | Type |
|---|---|
screenName |
String |
profileId |
String? |
Returns
Future<void>
incrementCount() screen_timer_service.dart
Increment a simple counter in profile stats and Grafana
Parameters
| Name | Type |
|---|---|
name |
String |
profileId |
String? |
Returns
Future<void>
_updateLocalStats() screen_timer_service.dart
Update local UserProfile stats
Returns
Future<void>
setCacheDuration() video_service.dart
Configure cache duration (updates JsonStorageService.defaultExpiry)
Parameters
| Name | Type |
|---|---|
duration |
Duration |
Returns
static void
fetchVideos() video_service.dart
Fetch videos from API with caching Cache automatically expires based on JsonStorageService.defaultExpiry Parameters: - useCache: If false, bypasses cache and forces fresh fetch
Returns
Future<VideoResult>
Returns: VideoResult
refreshVideos() video_service.dart
Force refresh videos (invalidates cache)
Returns
Future<VideoResult>
Returns: VideoResult
file-level() video_service.dart
Get a random video from the list
Parameters
| Name | Type |
|---|---|
videos |
Video |
Returns
Video?
Returns: Video
filterByConsciousnessLevel() video_service.dart
Filter videos by consciousness level tag
Parameters
| Name | Type |
|---|---|
videos |
Video |
level |
String |
Returns
List<Video>
Returns: Video
file-level() video_service.dart
Get consciousness level from astrological component (ported from AngularJS)
Parameters
| Name | Type |
|---|---|
component |
String |
Returns
String?
useCache() video_service.dart
Get appropriate video for a given astrological component
Parameters
| Name | Type |
|---|---|
component |
String |
useCache |
bool |
Returns
Future<Video?>
Returns: Video
_getFromCache() video_service.dart
Get videos from cache Expired entries are automatically filtered by JsonStorageService
Parameters
| Name | Type |
|---|---|
key |
String |
Returns
Future<List<Video>?>
Returns: Video
_addToCache() video_service.dart
Add videos to cache Expiry is handled automatically by JsonStorageService
Parameters
| Name | Type |
|---|---|
key |
String |
videos |
Video |
Returns
Future<void>
clearCache() video_service.dart
Clear video cache
Returns
Future<void>
cleanupExpiredCache() video_service.dart
Cleanup expired video cache entries
Returns
Future<void>
fetchVOCData() voc_service.dart
Fetch Void of Course data [date] - Optional date to fetch VOC for (defaults to current date) [limit] - Number of items to return [useCache] - Whether to use cached data if available
Returns
Future<VOCResult>
Returns: VOCResult
_getCacheKey() voc_service.dart
Generate cache key
Parameters
| Name | Type |
|---|---|
date |
DateTime |
limit |
int |
Returns
String
_getFromCache() voc_service.dart
Get data from cache (persists until app restart)
Parameters
| Name | Type |
|---|---|
key |
String |
Returns
Future<List<VOCItem>?>
Returns: VOCItem
_addToCache() voc_service.dart
Add data to cache
Parameters
| Name | Type |
|---|---|
key |
String |
items |
VOCItem |
Returns
Future<void>
clearCache() voc_service.dart
Clear all cached data
Returns
Future<void>
initializeWebView() webview_service_mobile.dart
Initialize webview with controller
Parameters
| Name | Type |
|---|---|
controller |
InAppWebViewController |
Returns
void
setWebViewSettings() webview_service_mobile.dart
Set webview settings
Returns
Future<void>
clearWebViewCache() webview_service_mobile.dart
Clear webview cache
Returns
Future<void>
setupJavaScriptHandlers() webview_service_mobile.dart
Setup JavaScript handlers
Returns
Future<void>
_handleInterstitialAd() webview_service_mobile.dart
Handle interstitial ad request
Returns
Future<void>
_handleRewardAd() webview_service_mobile.dart
Handle reward ad request
Parameters
| Name | Type |
|---|---|
value |
dynamic |
context |
BuildContext |
Returns
Future<void>
_handleLocationRequest() webview_service_mobile.dart
Handle location request
Parameters
| Name | Type |
|---|---|
value |
dynamic |
context |
BuildContext |
Returns
void
_handlePurchase() webview_service_mobile.dart
Handle purchase request — BLOCKS if no valid userId is available.
Returns
Future<void>
_handleRestorePurchases() webview_service_mobile.dart
Handle restore purchases
Returns
Future<void>
_handleQRScan() webview_service_mobile.dart
Handle QR scan request
Parameters
| Name | Type |
|---|---|
value |
dynamic |
context |
BuildContext |
Returns
void
_getPlatform() webview_service_mobile.dart
Open app store for review
Returns
String
_getPlatform() webview_service_mobile.dart
Get platform string
Returns
String
sendJsonToWebView() webview_service_mobile.dart
Send JSON data to webview
Parameters
| Name | Type |
|---|---|
key |
String |
data |
Map<String, dynamic> |
Returns
Future<void>
loadUrl() webview_service_mobile.dart
Load URL in webview
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
Future<void>
canGoBack() webview_service_mobile.dart
Check if webview can go back
Returns
Future<bool>
goBack() webview_service_mobile.dart
Go back in webview
Returns
Future<void>
pause() webview_service_mobile.dart
Handle app lifecycle pause
Returns
Future<void>
resume() webview_service_mobile.dart
Handle app lifecycle resume
Returns
Future<void>
saveCurrentState() webview_service_mobile.dart
Save current WebView state (last URL)
Returns
Future<void>
getCurrentUrl() webview_service_mobile.dart
Get current URL
Returns
Future<WebUri?>
Returns: WebUri
_syncSubscriptionAfterLogin() webview_service_mobile.dart
Shared logic for syncing subscription status to WebView after login This ensures cross-platform purchases are recognized immediately.
Parameters
| Name | Type |
|---|---|
userId |
String |
Returns
Future<void>
_handleSwitchToNewUI() webview_service_mobile.dart
Handle switch to new UI request from WebView
Parameters
| Name | Type |
|---|---|
context |
BuildContext |
Returns
Future<void>
syncSession() webview_service_mobile.dart
Proactively sync user identity with WebView from Flutter side
Parameters
| Name | Type |
|---|---|
userId |
String |
Returns
Future<void>
dispose() webview_service_mobile.dart
Dispose resources
Returns
void
initializeWebView() webview_service_web.dart
Initialize webview with controller
Parameters
| Name | Type |
|---|---|
controller |
InAppWebViewController |
Returns
void
setWebViewSettings() webview_service_web.dart
Set webview settings
Returns
Future<void>
clearWebViewCache() webview_service_web.dart
Clear webview cache
Returns
Future<void>
setupJavaScriptHandlers() webview_service_web.dart
Setup JavaScript handlers
Returns
Future<void>
_handlePurchase() webview_service_web.dart
Handle purchase request
Returns
Future<void>
sendJsonToWebView() webview_service_web.dart
Send JSON data to webview
Parameters
| Name | Type |
|---|---|
key |
String |
data |
Map<String, dynamic> |
Returns
Future<void>
loadUrl() webview_service_web.dart
Load URL in webview
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
Future<void>
canGoBack() webview_service_web.dart
Check if webview can go back
Returns
Future<bool>
goBack() webview_service_web.dart
Go back in webview
Returns
Future<void>
pause() webview_service_web.dart
Handle app lifecycle pause
Returns
Future<void>
resume() webview_service_web.dart
Handle app lifecycle resume
Returns
Future<void>
saveCurrentState() webview_service_web.dart
Save current WebView state (last URL)
Returns
Future<void>
getCurrentUrl() webview_service_web.dart
Get current URL
Returns
Future<WebUri?>
Returns: WebUri
syncSession() webview_service_web.dart
Proactively sync user identity with WebView from Flutter side
Parameters
| Name | Type |
|---|---|
userId |
String |
Returns
Future<void>
dispose() webview_service_web.dart
Dispose resources
Returns
void
interactiveHighlightSurface() app_colors.dart
Dropdown bars, category pills, and selected top tabs (from theme).
Parameters
| Name | Type |
|---|---|
colorScheme |
ColorScheme |
Returns
static Color
Returns: Color
interactiveHighlightBorder() app_colors.dart
Subtle border on interactive highlight surfaces (tabs, light pills).
Parameters
| Name | Type |
|---|---|
colorScheme |
ColorScheme |
Returns
static Color
Returns: Color
interactiveHighlightBorderStrong() app_colors.dart
Stronger border for dropdowns and picker bars.
Returns
static Color
Returns: Color
actionButtonBorder() app_colors.dart
Slightly darker rim for action-button pills so they read as highlighted / tappable. Kept thin by the caller's border width.
Parameters
| Name | Type |
|---|---|
isDark |
required bool |
Returns
static Color
Returns: Color
gradientSelectableListActiveFillDarkAt() app_gradients.dart
Same stops with optional alpha (translucent panels).
Parameters
| Name | Type |
|---|---|
opacity |
double |
Returns
static LinearGradient
Returns: LinearGradient
selectableListRowDecoration() selectable_list_row.dart
Inactive: transparent fill + light rim (dark). Active: plum gradient + soft rim. [selectedFillOpacity]: null or 1.0 = opaque; lower values let background show through (OOB). Light theme uses [selectableListRowDecorationLight].
Returns
BoxDecoration
Returns: BoxDecoration
selectableListRowDecorationLight() selectable_list_row.dart
Light-theme selectable row (bottom sheets, forecast lists).
Returns
BoxDecoration
Returns: BoxDecoration
forecastListRowDecoration() selectable_list_row.dart
@deprecated Use [selectableListRowDecoration] with `isSelected`.
Returns
BoxDecoration
Returns: BoxDecoration
createChartRenderer() chart_renderer.dart
Factory function to create the platform-specific chart renderer. Returns a [ChartRenderer] implementation for the current platform.
Uses Models
createChartRendererImpl() chart_renderer_stub.dart
Stub implementation that throws. This will be overridden by platform-specific implementations.
Uses Models
clean() generic_helper_methods.dart
Cleans the input string by removing any leading or trailing non-alphanumeric characters.
Parameters
| Name | Type |
|---|---|
input |
String |
Returns
String
variant() tarot_card_helper.dart
Card back image used across the app. // Existing app_assets on the server: tarotback3.png / tarotback4.png
Parameters
| Name | Type |
|---|---|
variant |
int |
Returns
static String
faceImageUrl() tarot_card_helper.dart
Build the card face image URL. Inputs: - [deck]: selected tarot deck (e.g. "astrotarot") - [cardName]: human-readable name (used only as a fallback/debug context) - [image]: value returned by the API for the card image - [category]: category returned by the API (often needed for correct pathing)
Returns
static String
file-level() tarot_card_helper.dart
Get card name from code
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
static String?
file-level() tarot_card_helper.dart
Get card code from name
Parameters
| Name | Type |
|---|---|
name |
String |
Returns
static String?
file-level() tarot_card_helper.dart
Get category from code
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
static String?
file-level() tarot_card_helper.dart
Get suit from code
Parameters
| Name | Type |
|---|---|
code |
String |
Returns
static String?
file-level() tarot_card_helper.dart
Get category from name
Parameters
| Name | Type |
|---|---|
name |
String |
Returns
static String?
file-level() tarot_card_helper.dart
Get suit from name
Parameters
| Name | Type |
|---|---|
name |
String |
Returns
static String?
toRiderWaite() tarot_card_helper.dart
Convert Princess/Prince to Page/Knight (Rider-Waite)
Parameters
| Name | Type |
|---|---|
name |
String |
Returns
static String
toThoth() tarot_card_helper.dart
Convert Page/Knight to Princess/Prince (Thoth)
Parameters
| Name | Type |
|---|---|
name |
String |
Returns
static String
file-level() tarot_card_helper.dart
Parse tarot link (e.g., "Tarot/A33" or full URL)
Parameters
| Name | Type |
|---|---|
link |
String |
Returns
static String?
getImageUrl() tarot_card_helper.dart
Get image URL for a card
Returns
static String
syncMatrixToChart() view_sync_helper.dart
Syncs Matrix category/type selection to Chart view. Called whenever the user changes Matrix category.
Parameters
| Name | Type |
|---|---|
matrixType |
MatrixType |
category |
String |
Returns
static Future<void>
syncChartToMatrix() view_sync_helper.dart
Syncs Chart view selection to Matrix category/type. Called whenever the user changes the Chart view on ChartScreen.
Uses Models
Parameters
| Name | Type |
|---|---|
chartType |
ChartType |
Returns
static Future<void>
notifyFlutterReady() web_utils_stub.dart
Stub for JS integration to prevent compilation errors on mobile.
Returns
void
notifyFlutterReady() web_utils_web.dart
Web implementation to signal readiness to the HTML splash screen.
Returns
void
hideSplashLogo() web_utils_web.dart
Web implementation to hide just the splash logo.
Returns
void
redirectToUrl() web_utils_web.dart
Redirect the browser to the given URL (used for old UI on web).
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
void
openUrlInNewTab() web_utils_web.dart
Open the given URL in a new browser tab.
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
void
file-level() web_utils_web.dart
Read a raw value from localStorage without prefix (used to migrate old UI users).
Parameters
| Name | Type |
|---|---|
key |
String |
Returns
String?
_initializeServices() web_view_screen.dart
Initialize all services
Returns
Future<void>
_setupServices() web_view_screen.dart
Setup all services
Returns
Future<void>
_syncSubscriptionToWebView() web_view_screen.dart
Cross-platform subscription sync. Checks backend for user's payment status (from any platform: Web, iOS, Android) This ensures users who purchased on a different platform are recognized.
Parameters
| Name | Type |
|---|---|
userId |
String |
Returns
Future<void>
initWebServices() web_view_screen.dart
Initialize web services using WebViewService
Returns
Future<void>
_saveValue() web_view_screen.dart
Save value in local storage
Returns
Future<void>
_formatDateMatrixStyle() weekly_report.dart
Format date in M/D/YYYY format to match matrix list view
Parameters
| Name | Type |
|---|---|
date |
DateTime |
Returns
String
_getAspectColor() weekly_report.dart
Determines if an aspect is challenging (red) or harmonious (green) Returns harmonious (green) for unknown aspects
Uses Models
Parameters
| Name | Type |
|---|---|
item |
MatrixItem |
planet |
String |
Returns
Color
Returns: Color
forceRender() persistent_chart_webview_web.dart
Force full re-render (consistency with mobile)
Returns
Future<void>
_recalculateChart() confirm_user_dialog.dart
Recalculate birth chart when timezone or coordinates change
Returns
Future<void>
_buildDialogContent() confirm_user_dialog.dart
Build the main content of the dialog
Returns
Widget
Returns: Widget
_handleConfirm() confirm_user_dialog.dart
Handle confirm button press — async so the spinner stays visible while the save + navigation run. _isSaving is only cleared on error; on success the route replacement naturally dismisses the dialog.
Returns
Future<void>
_buildMatrixItem() big_three_row.dart
Builds a [MatrixItem] for one placement (Sun/Moon/Rising).
Uses Models
Parameters
| Name | Type |
|---|---|
label |
String |
placement |
Placement |
_buildAllItems() big_three_row.dart
Merged list of all three Big Three items for cross-item Next/Back.
Uses Models
_networkImageHeaders() dynamic_page_background.dart
Headers many CDNs / hotlink-protected JPG hosts expect (Referer + browser UA).
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
Map<String, String>
_webUseSimpleImgLoad() dynamic_page_background.dart
On web, custom Referer/User-Agent on [Image.network] forces fetch + CORS preflight. Firebase Storage and GCS often fail that path; use plain URL + HTML <img> instead.
Parameters
| Name | Type |
|---|---|
url |
String |
Returns
bool
main() accuracy_test.dart
Astronomical Accuracy Tests Tests against known birth charts to verify calculations are correct Tolerance: ±2 degrees is standard in astrology due to: - Rounding differences - House system variations - Timezone/DST handling Run with: flutter test test/accuracy_test.dart
Returns
void
main() api_integration_test.dart
Automated API tests - Run with: flutter test test/api_integration_test.dart
Returns
void
_testUser() payload_service_test.dart
Minimal test user for payload building.
Returns
UserProfile
Returns: UserProfile
main() gpt_translate.dart
Quick GPT Translation Test - MINIMAL (saves API tokens) Run with: flutter test test/gpt_translation_test.dart
Returns
void
registerTestServices() test_helpers.dart
Registers fake/real lightweight services into GetIt for widget testing. Call this in setUpAll() before widget tests. Services that are singletons accessed via .instance (HoroscopeService) are set up via their test-specific APIs.
Returns
Future<void>
unregisterTestServices() test_helpers.dart
Cleans up GetIt and HoroscopeService singleton. Call this in tearDownAll() after widget tests.
Returns
Future<void>
buildTestApp() test_helpers.dart
Wraps [child] in a MaterialApp with theme, localization, and navigator matching the real app configuration. Use this in pumpWidget().
Returns
Widget
Returns: Widget
buildTestScaffold() test_helpers.dart
Wraps [child] in a Scaffold inside buildTestApp. Useful for widgets that expect a Scaffold ancestor.
Returns
Widget
Returns: Widget
_item() matrix_service_logic_test.dart
Helper to create a minimal MatrixItem for testing filterItems / attributes
Uses Models
main() quick_api_test.dart
Quick API comparison test Tests both timezonedb and Google API return same timezone Run with: flutter test test/quick_api_test.dart
Returns
void
main() traits_api_test.dart
Comprehensive Traits API Test Tests component traits API to debug why traits aren't showing Run with: flutter test test/traits_api_test.dart
Returns
void
dark() form_controls_test.dart
Wraps [child] in MaterialApp with full AppTheme (all required extensions).
Parameters
| Name | Type |
|---|---|
child |
Widget |
dark |
bool |
Returns
Widget
Returns: Widget