copyWith method

Session copyWith({
  1. int? id,
  2. bool? isCurrent,
  3. bool? isPasswordPending,
  4. bool? isUnconfirmed,
  5. bool? canAcceptSecretChats,
  6. bool? canAcceptCalls,
  7. SessionDeviceType? deviceType,
  8. int? apiId,
  9. String? applicationName,
  10. String? applicationVersion,
  11. bool? isOfficialApplication,
  12. String? deviceModel,
  13. String? platform,
  14. String? systemVersion,
  15. int? logInDate,
  16. int? lastActiveDate,
  17. String? ipAddress,
  18. String? location,
})

Implementation

Session copyWith({
  int? id,
  bool? isCurrent,
  bool? isPasswordPending,
  bool? isUnconfirmed,
  bool? canAcceptSecretChats,
  bool? canAcceptCalls,
  SessionDeviceType? deviceType,
  int? apiId,
  String? applicationName,
  String? applicationVersion,
  bool? isOfficialApplication,
  String? deviceModel,
  String? platform,
  String? systemVersion,
  int? logInDate,
  int? lastActiveDate,
  String? ipAddress,
  String? location,
}) => Session(
  id: id ?? this.id,
  isCurrent: isCurrent ?? this.isCurrent,
  isPasswordPending: isPasswordPending ?? this.isPasswordPending,
  isUnconfirmed: isUnconfirmed ?? this.isUnconfirmed,
  canAcceptSecretChats: canAcceptSecretChats ?? this.canAcceptSecretChats,
  canAcceptCalls: canAcceptCalls ?? this.canAcceptCalls,
  deviceType: deviceType ?? this.deviceType,
  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,
  ipAddress: ipAddress ?? this.ipAddress,
  location: location ?? this.location,
);