Update lot features

This commit is contained in:
2026-05-28 16:29:23 +07:00
parent 6272ece15d
commit 1110e5a42d
81 changed files with 4306 additions and 29813 deletions
@@ -45,6 +45,8 @@ final GoRouter appRouter = GoRouter(
redirect: (context, state) async {
final path = state.matchedLocation;
final serverUrl = await AppConstants.getServerUrl();
final isEditingServer =
path == '/server-connect' && state.uri.queryParameters['edit'] == '1';
final isPublicRoute = path == '/server-connect' ||
path == '/splash' ||
path == '/login' ||
@@ -53,7 +55,8 @@ final GoRouter appRouter = GoRouter(
if ((serverUrl == null || serverUrl.isEmpty) && path != '/server-connect') {
return '/server-connect';
}
if (path == '/server-connect' &&
if (!isEditingServer &&
path == '/server-connect' &&
serverUrl != null &&
serverUrl.isNotEmpty) {
return '/splash';
@@ -88,7 +91,9 @@ final GoRouter appRouter = GoRouter(
routes: [
GoRoute(
path: '/server-connect',
builder: (_, __) => const server_connect.ServerConnectScreen()),
builder: (_, state) => server_connect.ServerConnectScreen(
editMode: state.uri.queryParameters['edit'] == '1',
)),
GoRoute(
path: '/splash', builder: (_, __) => const auth_splash.SplashScreen()),
GoRoute(path: '/login', builder: (_, __) => const auth_login.LoginScreen()),
@@ -106,6 +111,7 @@ final GoRouter appRouter = GoRouter(
callerId: int.tryParse(extra['callerId']?.toString() ?? ''),
channelName: extra['channelName']?.toString(),
agoraToken: extra['agoraToken']?.toString(),
agoraAppId: extra['agoraAppId']?.toString(),
);
}),
ShellRoute(