import 'package:cpt_payment/modules/choose_card/choose_card_page.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

import '../payment_success/payment_success_page.dart';
import 'payment_confirm_state.dart';

part 'payment_confirm_view_model.g.dart';

@riverpod
class PaymentConfirmViewModel extends _$PaymentConfirmViewModel {
  @override
  PaymentConfirmState build() {
    return PaymentConfirmState();
  }

  //执行支付
  void doPayment() {
    PaymentSuccessPage.startWithPop();
  }

  //去设置银行卡页面
  void gotoChooseCardPage() {
    ChooseCardPage.startInstance();
  }
}
