import 'package:cpt_auth/modules/sing_up_success/sign_up_success_page.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:shared/utils/log_utils.dart';

import 'sign_up_verify_state.dart';

part 'sign_up_verify_view_model.g.dart';

@riverpod
class SignUpVerifyViewModel extends _$SignUpVerifyViewModel {
  @override
  SignUpVerifyState build() {
    final state = SignUpVerifyState();
    ref.onDispose(() {
      onDispose(state);
    });
    return state;
  }

  //校验SMS短信验证码
  void verifySignUpInput() {
    SignUpSuccessPage.startInstance();
  }

  //销毁资源
  void onDispose(SignUpVerifyState initState) {

    Log.d("SignUpVerifyViewModel 销毁 onDispose");
  }

}
