mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-15 07:29:30 +00:00
you page and switch users
This commit is contained in:
parent
3e405b795d
commit
3f496c57c4
17 changed files with 659 additions and 211 deletions
|
|
@ -22,7 +22,7 @@ class Routes {
|
|||
name: 'libraryItem',
|
||||
);
|
||||
|
||||
// settings
|
||||
// Local settings
|
||||
static const settings = _SimpleRoute(
|
||||
pathName: 'config',
|
||||
name: 'settings',
|
||||
|
|
@ -56,6 +56,18 @@ class Routes {
|
|||
name: 'libraryBrowser',
|
||||
// parentRoute: library,
|
||||
);
|
||||
|
||||
// you page for the user
|
||||
static const you = _SimpleRoute(
|
||||
pathName: 'you',
|
||||
name: 'you',
|
||||
);
|
||||
|
||||
// user management
|
||||
static const userManagement = _SimpleRoute(
|
||||
pathName: 'users',
|
||||
name: 'userManagement',
|
||||
);
|
||||
}
|
||||
|
||||
// a class to store path
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import 'package:whispering_pages/features/explore/view/search_result_page.dart';
|
|||
import 'package:whispering_pages/features/item_viewer/view/library_item_page.dart';
|
||||
import 'package:whispering_pages/features/library_browser/view/library_browser_page.dart';
|
||||
import 'package:whispering_pages/features/onboarding/view/onboarding_single_page.dart';
|
||||
import 'package:whispering_pages/features/you/view/server_manager.dart';
|
||||
import 'package:whispering_pages/features/you/view/you_page.dart';
|
||||
import 'package:whispering_pages/pages/home_page.dart';
|
||||
import 'package:whispering_pages/settings/view/app_settings_page.dart';
|
||||
import 'package:whispering_pages/settings/view/auto_sleep_timer_settings_page.dart';
|
||||
|
|
@ -139,9 +141,14 @@ class MyAppRouter {
|
|||
),
|
||||
],
|
||||
),
|
||||
// settings page
|
||||
// you page
|
||||
StatefulShellBranch(
|
||||
routes: <RouteBase>[
|
||||
GoRoute(
|
||||
path: Routes.you.path,
|
||||
name: Routes.you.name,
|
||||
pageBuilder: defaultPageBuilder(const YouPage()),
|
||||
),
|
||||
GoRoute(
|
||||
path: Routes.settings.path,
|
||||
name: Routes.settings.name,
|
||||
|
|
@ -157,6 +164,12 @@ class MyAppRouter {
|
|||
const AutoSleepTimerSettingsPage(),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: Routes.userManagement.path,
|
||||
name: Routes.userManagement.name,
|
||||
// builder: (context, state) => const UserManagementPage(),
|
||||
pageBuilder: defaultPageBuilder(const ServerManagerPage()),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -198,9 +198,9 @@ const _navigationItems = [
|
|||
activeIcon: Icons.search,
|
||||
),
|
||||
_NavigationItem(
|
||||
name: 'Settings',
|
||||
icon: Icons.settings_outlined,
|
||||
activeIcon: Icons.settings,
|
||||
name: 'You',
|
||||
icon: Icons.account_circle_outlined,
|
||||
activeIcon: Icons.account_circle,
|
||||
),
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue