payment_component_service.dart 855 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Community 组件的组件路由
  3. */
  4. import 'package:cpt_payment/modules/add_card/add_card_page.dart';
  5. import 'package:cpt_payment/modules/choose_card/choose_card_page.dart';
  6. import 'package:router/componentRouter/payment_service.dart';
  7. import 'package:hooks_riverpod/hooks_riverpod.dart';
  8. import 'package:riverpod_annotation/riverpod_annotation.dart';
  9. import '../../modules/payment/payment_page.dart';
  10. part 'payment_component_service.g.dart';
  11. @Riverpod(keepAlive: true)
  12. PaymentService paymentService(Ref ref) {
  13. return PaymentComponentService();
  14. }
  15. class PaymentComponentService extends PaymentService {
  16. @override
  17. void startPaymentPage() {
  18. PaymentPage.startInstance();
  19. }
  20. @override
  21. void startAddCardPage() {
  22. AddCardPage.startInstance();
  23. }
  24. @override
  25. void startChooseCardPage() {
  26. ChooseCardPage.startInstance();
  27. }
  28. }