toJson method

  1. @override
Map<String, dynamic> toJson()
override

Object to Map serializer

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    '@type': 'session',
    if (extra != null) '@extra': extra,
    'id': id,
    'is_current': is_current,
    'is_password_pending': is_password_pending,
    'is_unconfirmed': is_unconfirmed,
    'can_accept_secret_chats': can_accept_secret_chats,
    'can_accept_calls': can_accept_calls,
    'type': type,
    'api_id': api_id,
    'application_name': application_name,
    'application_version': application_version,
    'is_official_application': is_official_application,
    'device_model': device_model,
    'platform': platform,
    'system_version': system_version,
    'log_in_date': log_in_date,
    'last_active_date': last_active_date,
    'ip_address': ip_address,
    'location': location
  };
}