2023-10-21 21:25:09 +08:00
|
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
|
2024-04-09 17:23:28 +08:00
|
|
|
import '/screens/avatar_view/avatar_view_screen.dart';
|
|
|
|
import '/screens/my_profile/change_profile_screen/change_account_screen.dart';
|
|
|
|
import '/screens/my_profile/change_profile_screen/change_my_avatar_screen.dart';
|
|
|
|
import '/screens/contact_add/invite_group_chat_member_screen.dart';
|
|
|
|
import '/screens/group_chat_profile/change_group_chat_screen/change_group_chat_avatar_screen.dart';
|
|
|
|
import '/screens/group_chat_profile/change_group_chat_screen/change_group_chat_intro_screen.dart';
|
|
|
|
import '/screens/group_chat_profile/change_group_chat_screen/change_group_chat_name_screen.dart';
|
|
|
|
import '/screens/group_chat_profile/change_group_chat_screen/change_group_chat_remark_screen.dart';
|
|
|
|
import '/screens/group_chat_profile/change_group_chat_screen/change_my_remark_screen.dart';
|
|
|
|
import '/screens/group_chat_profile/group_chat_outline_screen/group_chat_outline_screen.dart';
|
|
|
|
import '/screens/group_chat_profile/group_chat_profile_screen.dart';
|
|
|
|
import '/screens/my_profile/change_profile_screen/change_basic_screen.dart';
|
|
|
|
import '/screens/my_profile/my_profile_screen.dart';
|
|
|
|
import '/screens/friend_profile/friend_profile_screen.dart';
|
|
|
|
import '/screens/friend_profile/friend_setting_screen/friend_setting_screen.dart';
|
2023-10-21 21:25:09 +08:00
|
|
|
import 'router_key.dart';
|
|
|
|
|
|
|
|
final myProfileRoute = GoRoute(
|
|
|
|
path: '/my_profile',
|
|
|
|
name: 'MyProfile',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return const MyProfileScreen();
|
|
|
|
},
|
|
|
|
routes: [
|
|
|
|
GoRoute(
|
|
|
|
path: 'avatar',
|
|
|
|
name: 'MyAvatar',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return AvatarViewScreen(
|
|
|
|
isMyself: true,
|
|
|
|
avatarType: AvatarType.user,
|
2024-03-16 12:15:13 +08:00
|
|
|
avatar: state.uri.queryParameters['avatar']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_avatar',
|
|
|
|
name: 'ChangeMyAvatar',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return const ChangeMyAvatarScreen();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_basic',
|
|
|
|
name: 'ChangeBasic',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return const ChangeBasicScreen();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_Account',
|
|
|
|
name: 'ChangeAccount',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return const ChangeAccountScreen();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
|
|
|
|
final friendProfileRoute = GoRoute(
|
|
|
|
path: '/friend_profile',
|
|
|
|
name: 'FriendProfile',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return FriendProfileScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
friendId: state.uri.queryParameters['friendId']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
routes: [
|
|
|
|
GoRoute(
|
|
|
|
path: 'avatar',
|
|
|
|
name: 'FriendAvatar',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return AvatarViewScreen(
|
|
|
|
isMyself: false,
|
|
|
|
avatarType: AvatarType.user,
|
2024-03-16 12:15:13 +08:00
|
|
|
avatar: state.uri.queryParameters['avatar']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'setting',
|
|
|
|
name: 'FriendSetting',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return FriendSettingScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
friendId: state.uri.queryParameters['friendId']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
|
|
|
|
final groupChatProfileRoute = GoRoute(
|
|
|
|
path: '/group_chat_profile',
|
|
|
|
name: 'GroupChatProfile',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return GroupChatProfileScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
routes: [
|
|
|
|
GoRoute(
|
|
|
|
path: 'outline',
|
|
|
|
name: 'GroupChatOutline',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return GroupChatOutlineScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'invite_member',
|
|
|
|
name: 'InviteGroupChatMember',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return InviteGroupChatMemberScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_avatar',
|
|
|
|
name: 'ChangeGroupChatAvatar',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return ChangeGroupChatAvatarScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_name',
|
|
|
|
name: 'ChangeGroupChatName',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return ChangeGroupChatNameScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
|
|
|
name: state.uri.queryParameters['name']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_intro',
|
|
|
|
name: 'ChangeGroupChatIntro',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return ChangeGroupChatIntroScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
|
|
|
intro: state.uri.queryParameters['intro']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_remark',
|
|
|
|
name: 'ChangeGroupChatRemark',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return ChangeGroupChatRemarkScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
|
|
|
nameRemark: state.uri.queryParameters['groupChatRemark']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
GoRoute(
|
|
|
|
path: 'change_my_remark',
|
|
|
|
name: 'ChangeMyRemark',
|
|
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
|
|
builder: (context, state) {
|
|
|
|
return ChangeMyRemarkScreen(
|
2024-03-16 12:15:13 +08:00
|
|
|
groupChatId: state.uri.queryParameters['groupChatId']!,
|
|
|
|
myRemark: state.uri.queryParameters['remarkInGroupChat']!,
|
2023-10-21 21:25:09 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|