I have multiple values (in class) in provider and when I use the autoDispose
modifier in provider then I want to dispose of only a few values in the provider is it possible to do like this?
I have searched for this on the internet but I didn't find any resources related to this requirement.
final provider = StateProvider((ref) => LoginDetails(
errorMessage: '', status: 0));
class LoginDetails {
int status;
String errorMessage;
LoginDetails({
required this.status,
required this.errorMessage,
});
LoginDetails copyWith({
int? status,
String? errorMessage,
}) =>
LoginDetails(
status: status ?? this.status,
errorMessage: errorMessage ?? this.errorMessage,
);
}