copyWith method

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

Implementation

Session copyWith({
  int? id,
  bool? isCurrent,
  bool? isPasswordPending,
  bool? canAcceptSecretChats,
  bool? canAcceptCalls,
  SessionType? type,
  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,
      type: type ?? this.type,
      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,
    );