/* * Community 组件的组件路由 */ import 'package:cpt_community/router/page/community_page_router.dart'; import 'package:flutter/cupertino.dart'; import 'package:router/componentRouter/community_service.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../modules/community/community_page.dart'; import '../../modules/my_following/my_follow/my_follow_page.dart'; import '../../modules/my_following/my_follower/my_follower_page.dart'; import '../../modules/my_posts/my_posts_page.dart'; part 'community_component_service.g.dart'; @Riverpod(keepAlive: true) CommunityService communityService(Ref ref) { return CommunityComponentService(); } class CommunityComponentService extends CommunityService { @override void startCommunityPage() { CommunityPage.startInstance(); } @override void startMyPostsPage() { MyPostsPage.startInstance(); } @override void startMyFollowPage() { MyFollowPage.startInstance(); } @override void startMyFollowerPage() { MyFollowerPage.startInstance(); } }