title: State does not persist on page navigation flutter
body: <p>i have an app and i am managing state with riverpod. Well i notice that on page navigation i lose the state and it resets to the initial state. Here is my code;</p>
  <p><strong>provider</strong></p>
  <pre><code>final registerAuthControllerProvider = StateNotifierProvider.autoDispose&lt;
   RegisterAuthController,
   AuthenticatingUser&gt;((ref) =&gt; RegisterAuthController(ref.read));
  </code></pre>
  <p><strong>State Notifier Code</strong></p>
  <pre><code>class RegisterAuthController extends StateNotifier&lt;AuthenticatingUser&gt; {
  RegisterAuthController(this._read) : super(AuthenticatingUser.initial());
  
  final Reader _read;
  
  void updateEmail(String email) async {
  state = state.copyWith(authenticating: true);
  final getEmail = await _read(authRepositoryProvider).checkEmail(email);
  if (getEmail == 'Email Already Exists') {
    state = state.copyWith(authenticating: false, emailError: true);
  }
  state = state.copyWith(authenticating: false, email: email);
  print(state);
  }
  
  void updatePersonalDetails(
     String firstName, String lastName, String phoneNumber) {
     state = state.copyWith(
      authenticating: false,
      firstName: firstName,
      lastName: lastName,
      phoneNumber: phoneNumber);
   print(state);
  </code></pre>
  <p>}
  }</p>
  <p><strong>State Class</strong>
  import 'package:equatable/equatable.dart';</p>
  <pre><code>class AuthenticatingUser extends Equatable {
    final String? firstName;
    final String? lastName;
    final String? email;
    final String? phoneNumber;
    final String? password;
    final int? passcode;
    final String? img;
    final bool authenticating;
    final bool emailError;
  
    AuthenticatingUser(
        {this.firstName,
        this.lastName,
        this.email,
        this.phoneNumber,
        this.password,
        this.passcode,
        required this.authenticating,
        required this.emailError,
       this.img});
  
  factory AuthenticatingUser.initial() {
    return AuthenticatingUser(
      firstName: null,
      lastName: null,
      email: null,
      phoneNumber: null,
      passcode: null,
      password: null,
      authenticating: false,
      emailError: false,
      img: null);
    }
  
  AuthenticatingUser copyWith(
    {String? firstName,
    String? lastName,
    String? email,
    String? phoneNumber,
    int? passcode,
    required bool authenticating,
    bool emailError = false,
    String? password,
    String? img}) {
   return AuthenticatingUser(
      authenticating: authenticating,
      firstName: firstName,
      lastName: lastName,
      email: email,
      password: password,
      passcode: passcode,
      phoneNumber: phoneNumber,
      emailError: emailError,
      img: img);
  }
  
    @override
    List&lt;Object?&gt; get props =&gt;
        [firstName, lastName, email, phoneNumber, password, img, authenticating];
  }
  </code></pre>
  <p><strong>Page 1 On tap method</strong></p>
  <pre><code> onTap: () =&gt; {
                print('object'),
                if (EmailValidator.validate(emailEditingController.text))
                  {
                    context
                        .read(registerAuthControllerProvider.notifier)
                        .updateEmail(emailEditingController.text),
                  },
                // notValid = true,
              },
  </code></pre>
  <p>the update email function's print state returns the state with the updated email but when navigate to the second page through a provider listener, and i update the state with the updatePersonalDetails function, i see that the authenticateduser.email state value is back to null. It's like the state is being reset after every page navigation. I want state to persist after page navigations. How can i accomplish that?</p>