feat(mobile-next): 导入官方 openim-flutter-demo 固定基线 3.8.3-patch.3 并完成双构建
- 上游: github.com/OpenIMSDK/openim-flutter-demo tag 3.8.3-patch.3 commit b3dfdb1e8aaeaaf6f0793e10cadd20d5c184a31f - 并行目录 mobile-next/ 原样导入(含 LICENSE),不覆盖现网 mobile/ - 锁定 Flutter 3.24.5 / Dart 3.5.4 / JDK 17 / Gradle 7.6.3 / AGP 7.3.1 - 实测 Android debug 与 release 构建均成功(见 docs/mobile-next-baseline-import.md) - 本提交可单独回退:git revert 1db1229(重写前) Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -0,0 +1,382 @@
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:openim_common/openim_common.dart';
|
||||
|
||||
import '../pages/chat/group_setup/edit_name/edit_name_logic.dart';
|
||||
import '../pages/chat/group_setup/group_member_list/group_member_list_logic.dart';
|
||||
import '../pages/contacts/add_by_search/add_by_search_logic.dart';
|
||||
import '../pages/contacts/group_profile_panel/group_profile_panel_logic.dart';
|
||||
import '../pages/contacts/select_contacts/select_contacts_logic.dart';
|
||||
import '../pages/mine/edit_my_info/edit_my_info_logic.dart';
|
||||
import 'app_pages.dart';
|
||||
|
||||
class AppNavigator {
|
||||
AppNavigator._();
|
||||
|
||||
static void startLogin() {
|
||||
Get.offAllNamed(AppRoutes.login);
|
||||
}
|
||||
|
||||
static void startBackLogin() {
|
||||
Get.until((route) => Get.currentRoute == AppRoutes.login);
|
||||
}
|
||||
|
||||
static void startMain({bool isAutoLogin = false, List<ConversationInfo>? conversations}) {
|
||||
Get.offAllNamed(
|
||||
AppRoutes.home,
|
||||
arguments: {'isAutoLogin': isAutoLogin, 'conversations': conversations},
|
||||
);
|
||||
}
|
||||
|
||||
static void startSplashToMain({bool isAutoLogin = false, List<ConversationInfo>? conversations}) {
|
||||
Get.offAndToNamed(
|
||||
AppRoutes.home,
|
||||
arguments: {'isAutoLogin': isAutoLogin, 'conversations': conversations},
|
||||
);
|
||||
}
|
||||
|
||||
static void startBackMain() {
|
||||
Get.until((route) => Get.currentRoute == AppRoutes.home);
|
||||
}
|
||||
|
||||
static startOANtfList({required ConversationInfo info}) {
|
||||
return Get.toNamed(AppRoutes.oaNotificationList, arguments: info);
|
||||
}
|
||||
|
||||
static Future<T?>? startChat<T>({
|
||||
required ConversationInfo conversationInfo,
|
||||
bool offUntilHome = true,
|
||||
String? draftText,
|
||||
Message? searchMessage,
|
||||
}) async {
|
||||
GetTags.createChatTag();
|
||||
|
||||
final arguments = {
|
||||
'draftText': draftText,
|
||||
'conversationInfo': conversationInfo,
|
||||
'searchMessage': searchMessage,
|
||||
};
|
||||
|
||||
return offUntilHome
|
||||
? Get.offNamedUntil(
|
||||
AppRoutes.chat,
|
||||
(route) => route.settings.name == AppRoutes.home,
|
||||
arguments: arguments,
|
||||
)
|
||||
: Get.toNamed(
|
||||
AppRoutes.chat,
|
||||
arguments: arguments,
|
||||
preventDuplicates: false,
|
||||
);
|
||||
}
|
||||
|
||||
static startMyQrcode() => Get.toNamed(AppRoutes.myQrcode);
|
||||
|
||||
static startFavoriteMange() => Get.toNamed(AppRoutes.favoriteManage);
|
||||
|
||||
static startAddContactsMethod() => Get.toNamed(AppRoutes.addContactsMethod);
|
||||
|
||||
static startScan() => Permissions.camera(() => Get.to(
|
||||
() => const QrcodeView(),
|
||||
transition: Transition.cupertino,
|
||||
popGesture: true,
|
||||
));
|
||||
|
||||
static startAddContactsBySearch({required SearchType searchType}) => Get.toNamed(
|
||||
AppRoutes.addContactsBySearch,
|
||||
arguments: {"searchType": searchType},
|
||||
);
|
||||
|
||||
static startUserProfilePane({
|
||||
required String userID,
|
||||
String? groupID,
|
||||
String? nickname,
|
||||
String? faceURL,
|
||||
bool offAllWhenDelFriend = false,
|
||||
bool offAndToNamed = false,
|
||||
bool forceCanAdd = false,
|
||||
}) {
|
||||
GetTags.createUserProfileTag();
|
||||
|
||||
final arguments = {
|
||||
'groupID': groupID,
|
||||
'userID': userID,
|
||||
'nickname': nickname,
|
||||
'faceURL': faceURL,
|
||||
'offAllWhenDelFriend': offAllWhenDelFriend,
|
||||
'forceCanAdd': forceCanAdd,
|
||||
};
|
||||
|
||||
return offAndToNamed
|
||||
? Get.offAndToNamed(AppRoutes.userProfilePanel, arguments: arguments)
|
||||
: Get.toNamed(
|
||||
AppRoutes.userProfilePanel,
|
||||
arguments: arguments,
|
||||
preventDuplicates: false,
|
||||
);
|
||||
}
|
||||
|
||||
static startPersonalInfo({
|
||||
required String userID,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.personalInfo, arguments: {
|
||||
'userID': userID,
|
||||
});
|
||||
|
||||
static startFriendSetup({
|
||||
required String userID,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.friendSetup, arguments: {
|
||||
'userID': userID,
|
||||
});
|
||||
|
||||
static startSetFriendRemark() => Get.toNamed(AppRoutes.setFriendRemark, arguments: {});
|
||||
|
||||
static startSendVerificationApplication({
|
||||
String? userID,
|
||||
String? groupID,
|
||||
JoinGroupMethod? joinGroupMethod,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.sendVerificationApplication, arguments: {
|
||||
'joinGroupMethod': joinGroupMethod,
|
||||
'userID': userID,
|
||||
'groupID': groupID,
|
||||
});
|
||||
|
||||
static startGroupProfilePanel({
|
||||
required String groupID,
|
||||
required JoinGroupMethod joinGroupMethod,
|
||||
bool offAndToNamed = false,
|
||||
}) =>
|
||||
offAndToNamed
|
||||
? Get.offAndToNamed(AppRoutes.groupProfilePanel, arguments: {
|
||||
'joinGroupMethod': joinGroupMethod,
|
||||
'groupID': groupID,
|
||||
})
|
||||
: Get.toNamed(AppRoutes.groupProfilePanel, arguments: {
|
||||
'joinGroupMethod': joinGroupMethod,
|
||||
'groupID': groupID,
|
||||
});
|
||||
|
||||
static startMyInfo() => Get.toNamed(AppRoutes.myInfo);
|
||||
|
||||
static startEditMyInfo({EditAttr attr = EditAttr.nickname, int? maxLength}) =>
|
||||
Get.toNamed(AppRoutes.editMyInfo, arguments: {'editAttr': attr, 'maxLength': maxLength});
|
||||
|
||||
static startAccountSetup() => Get.toNamed(AppRoutes.accountSetup);
|
||||
|
||||
static startBlacklist() => Get.toNamed(AppRoutes.blacklist);
|
||||
|
||||
static startLanguageSetup() => Get.toNamed(AppRoutes.languageSetup);
|
||||
|
||||
static startUnlockSetup() => Get.toNamed(AppRoutes.unlockSetup);
|
||||
|
||||
static startChangePassword() => Get.toNamed(AppRoutes.changePassword);
|
||||
|
||||
static startAboutUs() => Get.toNamed(AppRoutes.aboutUs);
|
||||
|
||||
static startChatSetup({
|
||||
required ConversationInfo conversationInfo,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.chatSetup, arguments: {
|
||||
'conversationInfo': conversationInfo,
|
||||
});
|
||||
|
||||
static startGroupChatSetup({
|
||||
required ConversationInfo conversationInfo,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.groupChatSetup, arguments: {
|
||||
'conversationInfo': conversationInfo,
|
||||
});
|
||||
|
||||
static startGroupManage({
|
||||
required GroupInfo groupInfo,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.groupManage, arguments: {
|
||||
'groupInfo': groupInfo,
|
||||
});
|
||||
|
||||
static startEditGroupName({required EditNameType type, String? faceUrl}) =>
|
||||
Get.toNamed(AppRoutes.editGroupName, arguments: {
|
||||
'type': type,
|
||||
'faceUrl': faceUrl,
|
||||
});
|
||||
|
||||
static Future<T?>? startGroupMemberList<T>({
|
||||
required GroupInfo groupInfo,
|
||||
GroupMemberOpType opType = GroupMemberOpType.view,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.groupMemberList, preventDuplicates: false, arguments: {
|
||||
'groupInfo': groupInfo,
|
||||
'opType': opType,
|
||||
});
|
||||
|
||||
static startSearchGroupMember({
|
||||
required GroupInfo groupInfo,
|
||||
GroupMemberOpType opType = GroupMemberOpType.view,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.searchGroupMember, arguments: {
|
||||
'groupInfo': groupInfo,
|
||||
'opType': opType,
|
||||
});
|
||||
|
||||
static startGroupQrcode() => Get.toNamed(AppRoutes.groupQrcode);
|
||||
|
||||
static startFriendRequests() => Get.toNamed(AppRoutes.friendRequests);
|
||||
|
||||
static startProcessFriendRequests({
|
||||
required FriendApplicationInfo applicationInfo,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.processFriendRequests, arguments: {
|
||||
'applicationInfo': applicationInfo,
|
||||
});
|
||||
|
||||
static startGroupRequests() => Get.toNamed(AppRoutes.groupRequests);
|
||||
|
||||
static startProcessGroupRequests({
|
||||
required GroupApplicationInfo applicationInfo,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.processGroupRequests, arguments: {
|
||||
'applicationInfo': applicationInfo,
|
||||
});
|
||||
|
||||
static startFriendList() => Get.toNamed(AppRoutes.friendList);
|
||||
|
||||
static startGroupList() => Get.toNamed(AppRoutes.groupList);
|
||||
|
||||
static startSearchFriend() => Get.toNamed(AppRoutes.searchFriend);
|
||||
|
||||
static startSearchGroup() => Get.toNamed(AppRoutes.searchGroup);
|
||||
|
||||
static startSelectContacts({
|
||||
required SelAction action,
|
||||
List<String>? defaultCheckedIDList,
|
||||
List<dynamic>? checkedList,
|
||||
List<String>? excludeIDList,
|
||||
bool openSelectedSheet = false,
|
||||
String? groupID,
|
||||
String? ex,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.selectContacts, arguments: {
|
||||
'action': action,
|
||||
'defaultCheckedIDList': defaultCheckedIDList,
|
||||
'checkedList': IMUtils.convertCheckedListToMap(checkedList),
|
||||
'excludeIDList': excludeIDList,
|
||||
'openSelectedSheet': openSelectedSheet,
|
||||
'groupID': groupID,
|
||||
'ex': ex,
|
||||
});
|
||||
|
||||
static startSelectContactsFromFriends() => Get.toNamed(AppRoutes.selectContactsFromFriends);
|
||||
|
||||
static startSelectContactsFromGroup() => Get.toNamed(AppRoutes.selectContactsFromGroup);
|
||||
|
||||
static startSelectContactsFromSearchFriends() => Get.toNamed(AppRoutes.selectContactsFromSearchFriends);
|
||||
|
||||
static startSelectContactsFromSearchGroup() => Get.toNamed(AppRoutes.selectContactsFromSearchGroup);
|
||||
|
||||
static startSelectContactsFromSearch() => Get.toNamed(AppRoutes.selectContactsFromSearch);
|
||||
|
||||
static startCreateGroup({
|
||||
List<UserInfo> defaultCheckedList = const [],
|
||||
}) async {
|
||||
final result = await startSelectContacts(
|
||||
action: SelAction.crateGroup,
|
||||
defaultCheckedIDList: defaultCheckedList.map((e) => e.userID!).toList(),
|
||||
);
|
||||
final list = IMUtils.convertSelectContactsResultToUserInfo(result);
|
||||
if (list is List<UserInfo>) {
|
||||
return Get.toNamed(
|
||||
AppRoutes.createGroup,
|
||||
arguments: {'checkedList': list, 'defaultCheckedList': defaultCheckedList},
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static startGlobalSearch() => Get.toNamed(AppRoutes.globalSearch);
|
||||
|
||||
static startExpandChatHistory({
|
||||
required SearchResultItems searchResultItems,
|
||||
required String defaultSearchKey,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.expandChatHistory, arguments: {
|
||||
'searchResultItems': searchResultItems,
|
||||
'defaultSearchKey': defaultSearchKey,
|
||||
});
|
||||
|
||||
static startRegister() => Get.toNamed(AppRoutes.register);
|
||||
|
||||
static void startVerifyPhone({
|
||||
String? phoneNumber,
|
||||
String? email,
|
||||
required String areaCode,
|
||||
required int usedFor,
|
||||
String? invitationCode,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.verifyPhone, arguments: {
|
||||
'phoneNumber': phoneNumber,
|
||||
'email': email,
|
||||
'areaCode': areaCode,
|
||||
'usedFor': usedFor,
|
||||
'invitationCode': invitationCode,
|
||||
});
|
||||
|
||||
static void startSetPassword({
|
||||
String? phoneNumber,
|
||||
String? email,
|
||||
required String areaCode,
|
||||
required int usedFor,
|
||||
required String verificationCode,
|
||||
String? invitationCode,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.setPassword, arguments: {
|
||||
'phoneNumber': phoneNumber,
|
||||
'email': email,
|
||||
'areaCode': areaCode,
|
||||
'usedFor': usedFor,
|
||||
'verificationCode': verificationCode,
|
||||
'invitationCode': invitationCode
|
||||
});
|
||||
|
||||
static void startSetSelfInfo({
|
||||
String? phoneNumber,
|
||||
String? email,
|
||||
String? account,
|
||||
required String areaCode,
|
||||
required password,
|
||||
required int usedFor,
|
||||
required String verificationCode,
|
||||
String? invitationCode,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.setSelfInfo, arguments: {
|
||||
'phoneNumber': phoneNumber,
|
||||
'email': email,
|
||||
'account': account,
|
||||
'areaCode': areaCode,
|
||||
'password': password,
|
||||
'usedFor': usedFor,
|
||||
'verificationCode': verificationCode,
|
||||
'invitationCode': invitationCode
|
||||
});
|
||||
|
||||
static startForgetPassword() => Get.toNamed(AppRoutes.forgetPassword);
|
||||
|
||||
static void startResetPassword({
|
||||
String? phoneNumber,
|
||||
String? email,
|
||||
String? account,
|
||||
required String areaCode,
|
||||
required String verificationCode,
|
||||
}) =>
|
||||
Get.toNamed(AppRoutes.resetPassword, arguments: {
|
||||
'phoneNumber': phoneNumber,
|
||||
'email': email,
|
||||
'account': account,
|
||||
'areaCode': areaCode,
|
||||
'usedFor': 2,
|
||||
'verificationCode': verificationCode,
|
||||
});
|
||||
|
||||
static startSelectContactsFromTag() => Get.toNamed(AppRoutes.selectContactsFromTag);
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../pages/chat/chat_binding.dart';
|
||||
import '../pages/chat/chat_setup/chat_setup_binding.dart';
|
||||
import '../pages/chat/chat_setup/chat_setup_view.dart';
|
||||
import '../pages/chat/chat_setup/favorite_manage/favorite_manage_binding.dart';
|
||||
import '../pages/chat/chat_setup/favorite_manage/favorite_manage_view.dart';
|
||||
import '../pages/chat/chat_view.dart';
|
||||
import '../pages/chat/group_setup/edit_name/edit_name_binding.dart';
|
||||
import '../pages/chat/group_setup/edit_name/edit_name_view.dart';
|
||||
import '../pages/chat/group_setup/group_manage/group_manage_binding.dart';
|
||||
import '../pages/chat/group_setup/group_manage/group_manage_view.dart';
|
||||
import '../pages/chat/group_setup/group_member_list/group_member_list_binding.dart';
|
||||
import '../pages/chat/group_setup/group_member_list/group_member_list_view.dart';
|
||||
import '../pages/chat/group_setup/group_member_list/search_group_member/search_group_member_binding.dart';
|
||||
import '../pages/chat/group_setup/group_member_list/search_group_member/search_group_member_view.dart';
|
||||
import '../pages/chat/group_setup/group_qrcode/group_qrcode_binding.dart';
|
||||
import '../pages/chat/group_setup/group_qrcode/group_qrcode_view.dart';
|
||||
import '../pages/chat/group_setup/group_setup_binding.dart';
|
||||
import '../pages/chat/group_setup/group_setup_view.dart';
|
||||
import '../pages/chat/oa_notification/oa_notification_binding.dart';
|
||||
import '../pages/chat/oa_notification/oa_notification_view.dart';
|
||||
import '../pages/contacts/add_by_search/add_by_search_binding.dart';
|
||||
import '../pages/contacts/add_by_search/add_by_search_view.dart';
|
||||
import '../pages/contacts/add_method/add_method_binding.dart';
|
||||
import '../pages/contacts/add_method/add_method_view.dart';
|
||||
import '../pages/contacts/create_group/create_group_binding.dart';
|
||||
import '../pages/contacts/create_group/create_group_view.dart';
|
||||
import '../pages/contacts/friend_list/friend_list_binding.dart';
|
||||
import '../pages/contacts/friend_list/friend_list_view.dart';
|
||||
import '../pages/contacts/friend_list/search_friend/search_friend_binding.dart';
|
||||
import '../pages/contacts/friend_list/search_friend/search_friend_view.dart';
|
||||
import '../pages/contacts/friend_requests/friend_requests_binding.dart';
|
||||
import '../pages/contacts/friend_requests/friend_requests_view.dart';
|
||||
import '../pages/contacts/friend_requests/process_friend_requests/process_friend_requests_binding.dart';
|
||||
import '../pages/contacts/friend_requests/process_friend_requests/process_friend_requests_view.dart';
|
||||
import '../pages/contacts/group_list/group_list_binding.dart';
|
||||
import '../pages/contacts/group_list/group_list_view.dart';
|
||||
import '../pages/contacts/group_list/search_group/search_group_binding.dart';
|
||||
import '../pages/contacts/group_list/search_group/search_group_view.dart';
|
||||
import '../pages/contacts/group_profile_panel/group_profile_panel_binding.dart';
|
||||
import '../pages/contacts/group_profile_panel/group_profile_panel_view.dart';
|
||||
import '../pages/contacts/group_requests/group_requests_binding.dart';
|
||||
import '../pages/contacts/group_requests/group_requests_view.dart';
|
||||
import '../pages/contacts/group_requests/process_group_requests/process_group_requests_binding.dart';
|
||||
import '../pages/contacts/group_requests/process_group_requests/process_group_requests_view.dart';
|
||||
import '../pages/contacts/select_contacts/friend_list/friend_list_binding.dart';
|
||||
import '../pages/contacts/select_contacts/friend_list/friend_list_view.dart';
|
||||
import '../pages/contacts/select_contacts/friend_list/search_friend/search_friend_binding.dart';
|
||||
import '../pages/contacts/select_contacts/friend_list/search_friend/search_friend_view.dart';
|
||||
import '../pages/contacts/select_contacts/group_list/group_list_binding.dart';
|
||||
import '../pages/contacts/select_contacts/group_list/group_list_view.dart';
|
||||
import '../pages/contacts/select_contacts/group_list/search_group/search_group_binding.dart';
|
||||
import '../pages/contacts/select_contacts/group_list/search_group/search_group_view.dart';
|
||||
import '../pages/contacts/select_contacts/search_contacts/search_contacts_binding.dart';
|
||||
import '../pages/contacts/select_contacts/search_contacts/search_contacts_view.dart';
|
||||
import '../pages/contacts/select_contacts/select_contacts_binding.dart';
|
||||
import '../pages/contacts/select_contacts/select_contacts_view.dart';
|
||||
import '../pages/contacts/send_verification_application/send_verification_application_binding.dart';
|
||||
import '../pages/contacts/send_verification_application/send_verification_application_view.dart';
|
||||
import '../pages/contacts/user_profile_panel/friend_setup/friend_setup_binding.dart';
|
||||
import '../pages/contacts/user_profile_panel/friend_setup/friend_setup_view.dart';
|
||||
import '../pages/contacts/user_profile_panel/personal_info/personal_info_binding.dart';
|
||||
import '../pages/contacts/user_profile_panel/personal_info/personal_info_view.dart';
|
||||
import '../pages/contacts/user_profile_panel/set_remark/set_remark_binding.dart';
|
||||
import '../pages/contacts/user_profile_panel/set_remark/set_remark_view.dart';
|
||||
import '../pages/contacts/user_profile_panel/user_profile _panel_binding.dart';
|
||||
import '../pages/contacts/user_profile_panel/user_profile _panel_view.dart';
|
||||
import '../pages/forget_password/forget_password_binding.dart';
|
||||
import '../pages/forget_password/forget_password_view.dart';
|
||||
import '../pages/forget_password/reset_password/reset_password_binding.dart';
|
||||
import '../pages/forget_password/reset_password/reset_password_view.dart';
|
||||
import '../pages/global_search/global_search_binding.dart';
|
||||
import '../pages/global_search/global_search_view.dart';
|
||||
import '../pages/home/home_binding.dart';
|
||||
import '../pages/home/home_view.dart';
|
||||
import '../pages/login/login_binding.dart';
|
||||
import '../pages/login/login_view.dart';
|
||||
import '../pages/mine/about_us/about_us_binding.dart';
|
||||
import '../pages/mine/about_us/about_us_view.dart';
|
||||
import '../pages/mine/account_setup/account_setup_binding.dart';
|
||||
import '../pages/mine/account_setup/account_setup_view.dart';
|
||||
import '../pages/mine/blacklist/blacklist_binding.dart';
|
||||
import '../pages/mine/blacklist/blacklist_view.dart';
|
||||
import '../pages/mine/change_pwd/change_pwd_binding.dart';
|
||||
import '../pages/mine/change_pwd/change_pwd_view.dart';
|
||||
import '../pages/mine/edit_my_info/edit_my_info_binding.dart';
|
||||
import '../pages/mine/edit_my_info/edit_my_info_view.dart';
|
||||
import '../pages/mine/language_setup/language_setup_binding.dart';
|
||||
import '../pages/mine/language_setup/language_setup_view.dart';
|
||||
import '../pages/mine/my_info/my_info_binding.dart';
|
||||
import '../pages/mine/my_info/my_info_view.dart';
|
||||
import '../pages/mine/my_qrcode/my_qrcode_binding.dart';
|
||||
import '../pages/mine/my_qrcode/my_qrcode_view.dart';
|
||||
import '../pages/mine/unlock_setup/unlock_setup_binding.dart';
|
||||
import '../pages/mine/unlock_setup/unlock_setup_view.dart';
|
||||
import '../pages/register/register_binding.dart';
|
||||
import '../pages/register/register_view.dart';
|
||||
import '../pages/register/set_password/set_password_binding.dart';
|
||||
import '../pages/register/set_password/set_password_view.dart';
|
||||
import '../pages/register/set_self_info/set_self_info_binding.dart';
|
||||
import '../pages/register/set_self_info/set_self_info_view.dart';
|
||||
import '../pages/register/verify_phone/verify_phone_binding.dart';
|
||||
import '../pages/register/verify_phone/verify_phone_view.dart';
|
||||
import '../pages/splash/splash_binding.dart';
|
||||
import '../pages/splash/splash_view.dart';
|
||||
|
||||
part 'app_routes.dart';
|
||||
|
||||
class AppPages {
|
||||
static _pageBuilder({
|
||||
required String name,
|
||||
required GetPageBuilder page,
|
||||
Bindings? binding,
|
||||
bool preventDuplicates = true,
|
||||
bool popGesture = true,
|
||||
}) =>
|
||||
GetPage(
|
||||
name: name,
|
||||
page: page,
|
||||
binding: binding,
|
||||
preventDuplicates: preventDuplicates,
|
||||
transition: Transition.cupertino,
|
||||
popGesture: popGesture,
|
||||
);
|
||||
|
||||
static final routes = <GetPage>[
|
||||
_pageBuilder(
|
||||
name: AppRoutes.splash,
|
||||
page: () => SplashPage(),
|
||||
binding: SplashBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.login,
|
||||
page: () => LoginPage(),
|
||||
binding: LoginBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.home,
|
||||
page: () => HomePage(),
|
||||
binding: HomeBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.chat,
|
||||
page: () => ChatPage(),
|
||||
binding: ChatBinding(),
|
||||
preventDuplicates: false,
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.myQrcode,
|
||||
page: () => MyQrcodePage(),
|
||||
binding: MyQrcodeBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.chatSetup,
|
||||
page: () => ChatSetupPage(),
|
||||
binding: ChatSetupBinding(),
|
||||
popGesture: false,
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.favoriteManage,
|
||||
page: () => FavoriteManagePage(),
|
||||
binding: FavoriteManageBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.addContactsMethod,
|
||||
page: () => AddContactsMethodPage(),
|
||||
binding: AddContactsMethodBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.addContactsBySearch,
|
||||
page: () => AddContactsBySearchPage(),
|
||||
binding: AddContactsBySearchBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.userProfilePanel,
|
||||
page: () => UserProfilePanelPage(),
|
||||
binding: UserProfilePanelBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.personalInfo,
|
||||
page: () => PersonalInfoPage(),
|
||||
binding: PersonalInfoBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.friendSetup,
|
||||
page: () => FriendSetupPage(),
|
||||
binding: FriendSetupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.setFriendRemark,
|
||||
page: () => SetFriendRemarkPage(),
|
||||
binding: SetFriendRemarkBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.sendVerificationApplication,
|
||||
page: () => SendVerificationApplicationPage(),
|
||||
binding: SendVerificationApplicationBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.groupProfilePanel,
|
||||
page: () => GroupProfilePanelPage(),
|
||||
binding: GroupProfilePanelBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.myInfo,
|
||||
page: () => MyInfoPage(),
|
||||
binding: MyInfoBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.editMyInfo,
|
||||
page: () => EditMyInfoPage(),
|
||||
binding: EditMyInfoBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.accountSetup,
|
||||
page: () => AccountSetupPage(),
|
||||
binding: AccountSetupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.blacklist,
|
||||
page: () => BlacklistPage(),
|
||||
binding: BlacklistBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.languageSetup,
|
||||
page: () => LanguageSetupPage(),
|
||||
binding: LanguageSetupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.unlockSetup,
|
||||
page: () => UnlockSetupPage(),
|
||||
binding: UnlockSetupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.changePassword,
|
||||
page: () => ChangePwdPage(),
|
||||
binding: ChangePwdBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.aboutUs,
|
||||
page: () => AboutUsPage(),
|
||||
binding: AboutUsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.groupChatSetup,
|
||||
page: () => GroupSetupPage(),
|
||||
binding: GroupSetupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.groupManage,
|
||||
page: () => GroupManagePage(),
|
||||
binding: GroupManageBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.editGroupName,
|
||||
page: () => EditGroupNamePage(),
|
||||
binding: EditGroupNameBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.groupMemberList,
|
||||
page: () => GroupMemberListPage(),
|
||||
binding: GroupMemberListBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.searchGroupMember,
|
||||
page: () => SearchGroupMemberPage(),
|
||||
binding: SearchGroupMemberBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.groupQrcode,
|
||||
page: () => GroupQrcodePage(),
|
||||
binding: GroupQrcodeBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.friendRequests,
|
||||
page: () => FriendRequestsPage(),
|
||||
binding: FriendRequestsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.processFriendRequests,
|
||||
page: () => ProcessFriendRequestsPage(),
|
||||
binding: ProcessFriendRequestsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.groupRequests,
|
||||
page: () => GroupRequestsPage(),
|
||||
binding: GroupRequestsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.processGroupRequests,
|
||||
page: () => ProcessGroupRequestsPage(),
|
||||
binding: ProcessGroupRequestsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.friendList,
|
||||
page: () => FriendListPage(),
|
||||
binding: FriendListBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.groupList,
|
||||
page: () => GroupListPage(),
|
||||
binding: GroupListBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.searchFriend,
|
||||
page: () => SearchFriendPage(),
|
||||
binding: SearchFriendBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.searchGroup,
|
||||
page: () => SearchGroupPage(),
|
||||
binding: SearchGroupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.selectContacts,
|
||||
page: () => SelectContactsPage(),
|
||||
binding: SelectContactsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.selectContactsFromFriends,
|
||||
page: () => SelectContactsFromFriendsPage(),
|
||||
binding: SelectContactsFromFriendsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.selectContactsFromGroup,
|
||||
page: () => SelectContactsFromGroupPage(),
|
||||
binding: SelectContactsFromGroupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.selectContactsFromSearchFriends,
|
||||
page: () => SelectContactsFromSearchFriendsPage(),
|
||||
binding: SelectContactsFromSearchFriendsBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.selectContactsFromSearchGroup,
|
||||
page: () => SelectContactsFromSearchGroupPage(),
|
||||
binding: SelectContactsFromSearchGroupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.selectContactsFromSearch,
|
||||
page: () => SelectContactsFromSearchPage(),
|
||||
binding: SelectContactsFromSearchBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.createGroup,
|
||||
page: () => CreateGroupPage(),
|
||||
binding: CreateGroupBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.globalSearch,
|
||||
page: () => GlobalSearchPage(),
|
||||
binding: GlobalSearchBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.register,
|
||||
page: () => RegisterPage(),
|
||||
binding: RegisterBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.verifyPhone,
|
||||
page: () => VerifyPhonePage(),
|
||||
binding: VerifyPhoneBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.setPassword,
|
||||
page: () => SetPasswordPage(),
|
||||
binding: SetPasswordBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.setSelfInfo,
|
||||
page: () => SetSelfInfoPage(),
|
||||
binding: SetSelfInfoBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.forgetPassword,
|
||||
page: () => ForgetPasswordPage(),
|
||||
binding: ForgetPasswordBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.resetPassword,
|
||||
page: () => ResetPasswordPage(),
|
||||
binding: ResetPasswordBinding(),
|
||||
),
|
||||
_pageBuilder(
|
||||
name: AppRoutes.oaNotificationList,
|
||||
page: () => OANotificationPage(),
|
||||
binding: OANotificationBinding(),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
part of 'app_pages.dart';
|
||||
|
||||
abstract class AppRoutes {
|
||||
static const notFound = '/not-found';
|
||||
static const splash = '/splash';
|
||||
static const login = '/login';
|
||||
static const home = '/home';
|
||||
static const chat = '/chat';
|
||||
static const myQrcode = '/my_qrcode';
|
||||
static const chatSetup = '/chat_setup';
|
||||
static const favoriteManage = '/favorite_manage';
|
||||
static const addContactsMethod = '/add_contacts_method';
|
||||
static const addContactsBySearch = '/add_contacts_by_search';
|
||||
static const userProfilePanel = '/user_profile_panel';
|
||||
static const personalInfo = '/personal_info';
|
||||
static const friendSetup = '/friend_setup';
|
||||
static const setFriendRemark = '/set_friend_remark';
|
||||
static const sendVerificationApplication = '/send_verification_application';
|
||||
static const groupProfilePanel = '/group_profile_panel';
|
||||
static const myInfo = '/my_info';
|
||||
static const editMyInfo = '/edit_my_info';
|
||||
static const accountSetup = '/account_setup';
|
||||
static const blacklist = '/blacklist';
|
||||
static const languageSetup = '/language_setup';
|
||||
static const unlockSetup = '/unlock_setup';
|
||||
static const changePassword = '/change_password';
|
||||
static const aboutUs = '/about_us';
|
||||
static const groupChatSetup = '/group_chat_setup';
|
||||
static const groupManage = '/group_manage';
|
||||
static const editGroupName = '/edit_group_name';
|
||||
static const groupMemberList = '/group_member_list';
|
||||
static const searchGroupMember = '/search_group_member';
|
||||
static const groupQrcode = '/group_qrcode';
|
||||
static const friendRequests = '/friend_requests';
|
||||
static const processFriendRequests = '/process_friend_requests';
|
||||
static const groupRequests = '/group_requests';
|
||||
static const processGroupRequests = '/process_group_requests';
|
||||
static const friendList = '/friend_list';
|
||||
static const groupList = '/group_list';
|
||||
static const searchFriend = '/search_friend';
|
||||
static const searchGroup = '/search_group';
|
||||
static const selectContacts = '/select_contacts';
|
||||
static const selectContactsFromFriends = '/select_contacts_from_friends';
|
||||
static const selectContactsFromSearchFriends = '/select_contacts_from_search_friends';
|
||||
static const selectContactsFromGroup = '/select_contacts_from_group';
|
||||
static const selectContactsFromSearchGroup = '/select_contacts_from_search_group';
|
||||
static const selectContactsFromSearch = '/select_contacts_from_search';
|
||||
static const createGroup = '/create_group';
|
||||
static const globalSearch = '/global_search';
|
||||
static const expandChatHistory = '/expand_chat_history';
|
||||
static const register = '/register';
|
||||
static const verifyPhone = '/verify_phone';
|
||||
static const setPassword = '/set_password';
|
||||
static const setSelfInfo = '/set_self_info';
|
||||
static const forgetPassword = '/forget_password';
|
||||
static const resetPassword = '/reset_password';
|
||||
static const selectContactsFromTag = '/select_contacts_from_tag';
|
||||
static const oaNotificationList = "/oa_notification_list";
|
||||
}
|
||||
|
||||
extension RoutesExtension on String {
|
||||
String toRoute() => '/${toLowerCase()}';
|
||||
}
|
||||
Reference in New Issue
Block a user