handleOffline method
void
handleOffline()
Implementation
void handleOffline() {
Map<String, dynamic> offlineEventData = {
'user_id': 'user_id_value',
'client_id': 'client_id_value',
'app_user_id': 'app_user_id_value',
'device_type': 'Desktop',
'device_os': 'MacIntel',
'device_id': '6lghgi',
'device_manufacturer': 'Other',
'device_carrier': 'Unknown',
'screen_height': '982',
'screen_width': '1512',
'app_version': 'app_version_value',
'browser':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
'browser_version':
'5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
'session_id': 'x119m',
'event_time_stamp': '2023-09-28T05:33:51.524Z',
'event_name': 'event_name_value',
'current_url': 'current_url_value',
'initial_referrer': 'initial_referrer_value',
'initial_referrer_domain': 'initial_referrer_domain_value',
'ip_address': 'ip_address_value',
'user_agent': 'user_agent_value',
'country': 'country_value',
'state': 'state_value',
'region': 'region_value',
'city': 'city_value',
'api_endpoint': 'api_endpoint_value',
'api_timestamp': '2023-09-28T05:33:51.524Z',
'ingestion_timestamp': '2023-09-28T05:33:51.524Z',
'created_at': '2023-09-28T05:33:51.524Z',
'updated_at': '2023-09-28T05:33:51.524Z',
'deleted_at': null,
'video_watched': 'video_watched_value',
'topic_watched': 'topic_watched_value',
'chapter_watched': 'hghg',
};
// Call the storeOfflineEvent function with the offlineEventData
storeOfflineEvent(offlineEventData);
}