Session.fromJson constructor

Session.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory Session.fromJson(Map<String, dynamic> json) => Session(
  id: int.parse(json['id']),
  isCurrent: json['is_current'],
  isPasswordPending: json['is_password_pending'],
  canAcceptSecretChats: json['can_accept_secret_chats'],
  canAcceptCalls: json['can_accept_calls'],
  apiId: json['api_id'],
  applicationName: json['application_name'],
  applicationVersion: json['application_version'],
  isOfficialApplication: json['is_official_application'],
  deviceModel: json['device_model'],
  platform: json['platform'],
  systemVersion: json['system_version'],
  logInDate: json['log_in_date'],
  lastActiveDate: json['last_active_date'],
  ip: json['ip'],
  country: json['country'],
  region: json['region'],
  extra: json['@extra'],
  clientId: json['@client_id'],
);