copyWith method

UserProfileState copyWith({
  1. UserProfile? profile,
  2. bool? isLoading,
  3. bool? isEditing,
  4. String? error,
})

Implementation

UserProfileState copyWith({
  UserProfile? profile,
  bool? isLoading,
  bool? isEditing,
  String? error,
}) {
  return UserProfileState(
    profile: profile ?? this.profile,
    isLoading: isLoading ?? this.isLoading,
    isEditing: isEditing ?? this.isEditing,
    error: error ?? this.error,
  );
}