completed migrating data scope from user to workspace

This commit is contained in:
2026-06-22 22:10:38 +02:00
parent 62c7f53de0
commit ae2705363a
37 changed files with 918 additions and 221 deletions

View File

@@ -29,6 +29,7 @@ import 'package:qpay/screens/profile_screen.dart';
import 'package:qpay/screens/receipt/receipt_screen.dart';
import 'package:qpay/screens/recipient/recipients_screen.dart';
import 'package:qpay/screens/splash_screen.dart';
import 'package:qpay/screens/workspaces/workspace_screen.dart';
/// Tracks whether the splash animation is complete so that
/// GoRouter's redirect can show the splash first, then release
@@ -135,9 +136,10 @@ GoRouter buildRouter() {
return authState.requireAuth(path);
}
// Splash → original route or home.
// Splash → workspace selector (which may auto-redirect to home
// if only one workspace exists).
if (path == '/splash') {
return splashState.intendedRoute ?? '/';
return '/workspace';
}
}
@@ -153,12 +155,13 @@ GoRouter buildRouter() {
ShellRoute(
builder: (context, state, child) {
final location = GoRouterState.of(context).uri.toString();
if (location.startsWith('/onboarding/')) {
if (location.startsWith('/onboarding/') || location == '/workspace') {
return child;
}
return ScaffoldWithNavBar(child: child);
},
routes: [
GoRoute(path: '/workspace', builder: (context, state) => const WorkspaceScreen()),
GoRoute(path: '/', builder: (context, state) => const HomeScreen()),
GoRoute(
path: '/home',
@@ -229,8 +232,7 @@ GoRouter buildRouter() {
),
GoRoute(
path: '/groups/create-from-file',
builder: (context, state) =>
const CreateGroupFromFileScreen(),
builder: (context, state) => const CreateGroupFromFileScreen(),
),
GoRoute(
path: '/groups/:groupId',