mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 12:23:31 +00:00
Rename "home" to timelines
This commit is contained in:
parent
3ede9ed04c
commit
0f4ecd8676
5 changed files with 16 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_secure_storage (3.3.1):
|
||||
- flutter_secure_storage (6.0.0):
|
||||
- Flutter
|
||||
- FMDB (2.7.5):
|
||||
- FMDB/standard (= 2.7.5)
|
||||
|
@ -43,7 +43,7 @@ EXTERNAL SOURCES:
|
|||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec
|
||||
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
|
||||
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
|
||||
|
|
|
@ -5,7 +5,7 @@ import 'package:go_router/go_router.dart';
|
|||
import '../routes.dart';
|
||||
|
||||
enum NavBarButtons {
|
||||
home,
|
||||
timelines,
|
||||
notifications,
|
||||
messages,
|
||||
contacts,
|
||||
|
@ -28,9 +28,9 @@ class AppBottomNavBar extends StatelessWidget {
|
|||
}
|
||||
|
||||
switch (newButton) {
|
||||
case NavBarButtons.home:
|
||||
case NavBarButtons.timelines:
|
||||
Navigator.of(context).popUntil((route) {
|
||||
return route.settings.name == ScreenPaths.home;
|
||||
return route.settings.name == ScreenPaths.timelines;
|
||||
});
|
||||
break;
|
||||
case NavBarButtons.notifications:
|
||||
|
@ -57,7 +57,7 @@ class AppBottomNavBar extends StatelessWidget {
|
|||
|
||||
int _buttonToIndex(NavBarButtons button) {
|
||||
switch (button) {
|
||||
case NavBarButtons.home:
|
||||
case NavBarButtons.timelines:
|
||||
return 0;
|
||||
case NavBarButtons.notifications:
|
||||
return 1;
|
||||
|
@ -72,7 +72,7 @@ class AppBottomNavBar extends StatelessWidget {
|
|||
|
||||
NavBarButtons _indexToButton(int index) {
|
||||
if (index == 0) {
|
||||
return NavBarButtons.home;
|
||||
return NavBarButtons.timelines;
|
||||
}
|
||||
|
||||
if (index == 1) {
|
||||
|
@ -97,7 +97,7 @@ class AppBottomNavBar extends StatelessWidget {
|
|||
List<BottomNavigationBarItem> get _menuItems {
|
||||
return const [
|
||||
BottomNavigationBarItem(
|
||||
label: 'Home',
|
||||
label: 'Timelines',
|
||||
icon: Icon(Icons.home_outlined),
|
||||
activeIcon: Icon(Icons.home_filled),
|
||||
),
|
||||
|
|
|
@ -14,7 +14,7 @@ import 'services/auth_service.dart';
|
|||
|
||||
class ScreenPaths {
|
||||
static String splash = '/splash';
|
||||
static String home = '/';
|
||||
static String timelines = '/';
|
||||
static String profile = '/profile';
|
||||
static String notifications = '/notifications';
|
||||
static String signin = '/signin';
|
||||
|
@ -33,7 +33,7 @@ final allowedLoggedOut = [
|
|||
];
|
||||
|
||||
final appRouter = GoRouter(
|
||||
initialLocation: ScreenPaths.home,
|
||||
initialLocation: ScreenPaths.timelines,
|
||||
debugLogDiagnostics: true,
|
||||
refreshListenable: _authService,
|
||||
redirect: (context, state) async {
|
||||
|
@ -47,7 +47,7 @@ final appRouter = GoRouter(
|
|||
|
||||
if (loggedIn && allowedLoggedOut.contains(state.location)) {
|
||||
print('Redirecting to home');
|
||||
return ScreenPaths.home;
|
||||
return ScreenPaths.timelines;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -59,10 +59,10 @@ final appRouter = GoRouter(
|
|||
builder: (context, state) => SignInScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: ScreenPaths.home,
|
||||
name: ScreenPaths.home,
|
||||
path: ScreenPaths.timelines,
|
||||
name: ScreenPaths.timelines,
|
||||
pageBuilder: (context, state) => NoTransitionPage(
|
||||
name: ScreenPaths.home,
|
||||
name: ScreenPaths.timelines,
|
||||
child: HomeScreen(),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -95,7 +95,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
],
|
||||
),
|
||||
bottomNavigationBar: const AppBottomNavBar(
|
||||
currentButton: NavBarButtons.home,
|
||||
currentButton: NavBarButtons.timelines,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class UserPostsScreen extends StatelessWidget {
|
|||
IconButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).popUntil((route) {
|
||||
return route.settings.name == ScreenPaths.home;
|
||||
return route.settings.name == ScreenPaths.timelines;
|
||||
});
|
||||
},
|
||||
icon: const Icon(Icons.home),
|
||||
|
|
Loading…
Reference in a new issue