copyWith method

Session copyWith({
  1. int? id,
  2. bool? isCurrent,
  3. bool? isPasswordPending,
  4. bool? canAcceptSecretChats,
  5. bool? canAcceptCalls,
  6. int? apiId,
  7. String? applicationName,
  8. String? applicationVersion,
  9. bool? isOfficialApplication,
  10. String? deviceModel,
  11. String? platform,
  12. String? systemVersion,
  13. int? logInDate,
  14. int? lastActiveDate,
  15. String? ip,
  16. String? country,
  17. String? region,
  18. dynamic extra,
  19. int? clientId,
})

Implementation

Session copyWith({
  int? id,
  bool? isCurrent,
  bool? isPasswordPending,
  bool? canAcceptSecretChats,
  bool? canAcceptCalls,
  int? apiId,
  String? applicationName,
  String? applicationVersion,
  bool? isOfficialApplication,
  String? deviceModel,
  String? platform,
  String? systemVersion,
  int? logInDate,
  int? lastActiveDate,
  String? ip,
  String? country,
  String? region,
  dynamic extra,
  int? clientId,
}) => Session(
  id: id ?? this.id,
  isCurrent: isCurrent ?? this.isCurrent,
  isPasswordPending: isPasswordPending ?? this.isPasswordPending,
  canAcceptSecretChats: canAcceptSecretChats ?? this.canAcceptSecretChats,
  canAcceptCalls: canAcceptCalls ?? this.canAcceptCalls,
  apiId: apiId ?? this.apiId,
  applicationName: applicationName ?? this.applicationName,
  applicationVersion: applicationVersion ?? this.applicationVersion,
  isOfficialApplication: isOfficialApplication ?? this.isOfficialApplication,
  deviceModel: deviceModel ?? this.deviceModel,
  platform: platform ?? this.platform,
  systemVersion: systemVersion ?? this.systemVersion,
  logInDate: logInDate ?? this.logInDate,
  lastActiveDate: lastActiveDate ?? this.lastActiveDate,
  ip: ip ?? this.ip,
  country: country ?? this.country,
  region: region ?? this.region,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);