Rename "home" to timelines

codemagic-setup
Hank Grabowski 2022-12-08 14:23:11 -05:00
rodzic 3ede9ed04c
commit 0f4ecd8676
5 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
PODS: PODS:
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_secure_storage (3.3.1): - flutter_secure_storage (6.0.0):
- Flutter - Flutter
- FMDB (2.7.5): - FMDB (2.7.5):
- FMDB/standard (= 2.7.5) - FMDB/standard (= 2.7.5)
@ -43,7 +43,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad

Wyświetl plik

@ -5,7 +5,7 @@ import 'package:go_router/go_router.dart';
import '../routes.dart'; import '../routes.dart';
enum NavBarButtons { enum NavBarButtons {
home, timelines,
notifications, notifications,
messages, messages,
contacts, contacts,
@ -28,9 +28,9 @@ class AppBottomNavBar extends StatelessWidget {
} }
switch (newButton) { switch (newButton) {
case NavBarButtons.home: case NavBarButtons.timelines:
Navigator.of(context).popUntil((route) { Navigator.of(context).popUntil((route) {
return route.settings.name == ScreenPaths.home; return route.settings.name == ScreenPaths.timelines;
}); });
break; break;
case NavBarButtons.notifications: case NavBarButtons.notifications:
@ -57,7 +57,7 @@ class AppBottomNavBar extends StatelessWidget {
int _buttonToIndex(NavBarButtons button) { int _buttonToIndex(NavBarButtons button) {
switch (button) { switch (button) {
case NavBarButtons.home: case NavBarButtons.timelines:
return 0; return 0;
case NavBarButtons.notifications: case NavBarButtons.notifications:
return 1; return 1;
@ -72,7 +72,7 @@ class AppBottomNavBar extends StatelessWidget {
NavBarButtons _indexToButton(int index) { NavBarButtons _indexToButton(int index) {
if (index == 0) { if (index == 0) {
return NavBarButtons.home; return NavBarButtons.timelines;
} }
if (index == 1) { if (index == 1) {
@ -97,7 +97,7 @@ class AppBottomNavBar extends StatelessWidget {
List<BottomNavigationBarItem> get _menuItems { List<BottomNavigationBarItem> get _menuItems {
return const [ return const [
BottomNavigationBarItem( BottomNavigationBarItem(
label: 'Home', label: 'Timelines',
icon: Icon(Icons.home_outlined), icon: Icon(Icons.home_outlined),
activeIcon: Icon(Icons.home_filled), activeIcon: Icon(Icons.home_filled),
), ),

Wyświetl plik

@ -14,7 +14,7 @@ import 'services/auth_service.dart';
class ScreenPaths { class ScreenPaths {
static String splash = '/splash'; static String splash = '/splash';
static String home = '/'; static String timelines = '/';
static String profile = '/profile'; static String profile = '/profile';
static String notifications = '/notifications'; static String notifications = '/notifications';
static String signin = '/signin'; static String signin = '/signin';
@ -33,7 +33,7 @@ final allowedLoggedOut = [
]; ];
final appRouter = GoRouter( final appRouter = GoRouter(
initialLocation: ScreenPaths.home, initialLocation: ScreenPaths.timelines,
debugLogDiagnostics: true, debugLogDiagnostics: true,
refreshListenable: _authService, refreshListenable: _authService,
redirect: (context, state) async { redirect: (context, state) async {
@ -47,7 +47,7 @@ final appRouter = GoRouter(
if (loggedIn && allowedLoggedOut.contains(state.location)) { if (loggedIn && allowedLoggedOut.contains(state.location)) {
print('Redirecting to home'); print('Redirecting to home');
return ScreenPaths.home; return ScreenPaths.timelines;
} }
return null; return null;
@ -59,10 +59,10 @@ final appRouter = GoRouter(
builder: (context, state) => SignInScreen(), builder: (context, state) => SignInScreen(),
), ),
GoRoute( GoRoute(
path: ScreenPaths.home, path: ScreenPaths.timelines,
name: ScreenPaths.home, name: ScreenPaths.timelines,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => NoTransitionPage(
name: ScreenPaths.home, name: ScreenPaths.timelines,
child: HomeScreen(), child: HomeScreen(),
), ),
), ),

Wyświetl plik

@ -95,7 +95,7 @@ class _HomeScreenState extends State<HomeScreen> {
], ],
), ),
bottomNavigationBar: const AppBottomNavBar( bottomNavigationBar: const AppBottomNavBar(
currentButton: NavBarButtons.home, currentButton: NavBarButtons.timelines,
), ),
); );
} }

Wyświetl plik

@ -18,7 +18,7 @@ class UserPostsScreen extends StatelessWidget {
IconButton( IconButton(
onPressed: () { onPressed: () {
Navigator.of(context).popUntil((route) { Navigator.of(context).popUntil((route) {
return route.settings.name == ScreenPaths.home; return route.settings.name == ScreenPaths.timelines;
}); });
}, },
icon: const Icon(Icons.home), icon: const Icon(Icons.home),