auth_component_service.dart 775 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Auth 组件的组件路由
  3. */
  4. import 'package:cpt_auth/modules/forgot_input/forgot_input_page.dart';
  5. import 'package:flutter/cupertino.dart';
  6. import 'package:router/componentRouter/auth_service.dart';
  7. import 'package:flutter/material.dart';
  8. import 'package:hooks_riverpod/hooks_riverpod.dart';
  9. import 'package:riverpod_annotation/riverpod_annotation.dart';
  10. import '../../modules/auth_login/auth_login_page.dart';
  11. part 'auth_component_service.g.dart';
  12. @Riverpod(keepAlive: true)
  13. AuthService authService(Ref ref) {
  14. return AuthComponentService();
  15. }
  16. class AuthComponentService extends AuthService {
  17. @override
  18. void startLoginPage() {
  19. AuthLoginPage.startInstance();
  20. }
  21. @override
  22. void startResetPasswordPage() {
  23. ForgotInputPage.startInstance();
  24. }
  25. }