copyWith method

UserMessagingRepositoryState copyWith({
  1. String? currentToken,
  2. NotificationSettings? notificationSettings,
  3. Map<String, FCMToken>? attachedFCMTokens,
})

Creates a new instance of the state with updated values.

Implementation

UserMessagingRepositoryState copyWith({
  String? currentToken,
  NotificationSettings? notificationSettings,
  Map<String, FCMToken>? attachedFCMTokens,
}) {
  return UserMessagingRepositoryState(
    currentToken: currentToken ?? this.currentToken,
    notificationSettings: notificationSettings ?? this.notificationSettings,
    attachedFCMTokens: attachedFCMTokens ?? this.attachedFCMTokens,
  );
}