From c5288b505a8e15ad0359ab7af7e94e2eae1b4d41 Mon Sep 17 00:00:00 2001 From: gruvw Date: Mon, 8 Apr 2024 09:48:28 +0200 Subject: [PATCH] refactor(navigation): move navigation related to nav directory --- .../bottom_navigation_bar/navigation_bar_routes.dart | 0 .../bottom_navigation_bar/navigation_bottom_bar.dart | 2 +- .../leading_back_button/leading_back_button.dart | 0 lib/views/pages/create_account_page.dart | 2 +- lib/views/pages/home/home_page.dart | 4 ++-- lib/views/pages/new_post/new_post_page.dart | 2 +- lib/views/pages/profile/profile_page.dart | 2 +- test/component/home/navigation_home_test.dart | 6 +++--- test/component/home/static_home_test.dart | 5 +++-- test/component/login_test.dart | 2 +- test/component/new_post_test.dart | 2 +- 11 files changed, 14 insertions(+), 13 deletions(-) rename lib/views/{ => navigation}/bottom_navigation_bar/navigation_bar_routes.dart (100%) rename lib/views/{ => navigation}/bottom_navigation_bar/navigation_bottom_bar.dart (93%) rename lib/views/{ => navigation}/leading_back_button/leading_back_button.dart (100%) diff --git a/lib/views/bottom_navigation_bar/navigation_bar_routes.dart b/lib/views/navigation/bottom_navigation_bar/navigation_bar_routes.dart similarity index 100% rename from lib/views/bottom_navigation_bar/navigation_bar_routes.dart rename to lib/views/navigation/bottom_navigation_bar/navigation_bar_routes.dart diff --git a/lib/views/bottom_navigation_bar/navigation_bottom_bar.dart b/lib/views/navigation/bottom_navigation_bar/navigation_bottom_bar.dart similarity index 93% rename from lib/views/bottom_navigation_bar/navigation_bottom_bar.dart rename to lib/views/navigation/bottom_navigation_bar/navigation_bottom_bar.dart index a7695adc..e28d8fdf 100644 --- a/lib/views/bottom_navigation_bar/navigation_bottom_bar.dart +++ b/lib/views/navigation/bottom_navigation_bar/navigation_bottom_bar.dart @@ -1,6 +1,6 @@ import "package:flutter/material.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; -import "package:proxima/views/bottom_navigation_bar/navigation_bar_routes.dart"; +import "package:proxima/views/navigation/bottom_navigation_bar/navigation_bar_routes.dart"; /// This widget is the bottom navigation bar of the home page. /// It contains the navigation routes to the different pages. diff --git a/lib/views/leading_back_button/leading_back_button.dart b/lib/views/navigation/leading_back_button/leading_back_button.dart similarity index 100% rename from lib/views/leading_back_button/leading_back_button.dart rename to lib/views/navigation/leading_back_button/leading_back_button.dart diff --git a/lib/views/pages/create_account_page.dart b/lib/views/pages/create_account_page.dart index 17aaf0ef..6afb921f 100644 --- a/lib/views/pages/create_account_page.dart +++ b/lib/views/pages/create_account_page.dart @@ -2,7 +2,7 @@ import "package:flutter/material.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:proxima/utils/ui/scrollable_if_too_high.dart"; import "package:proxima/viewmodels/login_view_model.dart"; -import "package:proxima/views/leading_back_button/leading_back_button.dart"; +import "package:proxima/views/navigation/leading_back_button/leading_back_button.dart"; import "package:proxima/views/navigation/routes.dart"; class CreateAccountPage extends HookConsumerWidget { diff --git a/lib/views/pages/home/home_page.dart b/lib/views/pages/home/home_page.dart index 08b1d806..e5856c98 100644 --- a/lib/views/pages/home/home_page.dart +++ b/lib/views/pages/home/home_page.dart @@ -2,8 +2,8 @@ import "package:flutter/material.dart"; import "package:flutter_hooks/flutter_hooks.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:proxima/viewmodels/login_view_model.dart"; -import "package:proxima/views/bottom_navigation_bar/navigation_bar_routes.dart"; -import "package:proxima/views/bottom_navigation_bar/navigation_bottom_bar.dart"; +import "package:proxima/views/navigation/bottom_navigation_bar/navigation_bar_routes.dart"; +import "package:proxima/views/navigation/bottom_navigation_bar/navigation_bottom_bar.dart"; import "package:proxima/views/navigation/routes.dart"; import "package:proxima/views/pages/home/top_bar/home_top_bar.dart"; diff --git a/lib/views/pages/new_post/new_post_page.dart b/lib/views/pages/new_post/new_post_page.dart index cecba90b..e816bbc7 100644 --- a/lib/views/pages/new_post/new_post_page.dart +++ b/lib/views/pages/new_post/new_post_page.dart @@ -1,6 +1,6 @@ import "package:flutter/material.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; -import "package:proxima/views/leading_back_button/leading_back_button.dart"; +import "package:proxima/views/navigation/leading_back_button/leading_back_button.dart"; import "package:proxima/views/pages/new_post/new_post_form.dart"; diff --git a/lib/views/pages/profile/profile_page.dart b/lib/views/pages/profile/profile_page.dart index 05135b6d..c3403a7f 100644 --- a/lib/views/pages/profile/profile_page.dart +++ b/lib/views/pages/profile/profile_page.dart @@ -1,7 +1,7 @@ import "package:flutter/material.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:proxima/viewmodels/profile_view_model.dart"; -import "package:proxima/views/leading_back_button/leading_back_button.dart"; +import "package:proxima/views/navigation/leading_back_button/leading_back_button.dart"; import "package:proxima/views/pages/profile/posts_info/info_card.dart"; import "package:proxima/views/pages/profile/posts_info/info_column.dart"; import "package:proxima/views/pages/profile/posts_info/info_row.dart"; diff --git a/test/component/home/navigation_home_test.dart b/test/component/home/navigation_home_test.dart index 7f107bfe..83b859dc 100644 --- a/test/component/home/navigation_home_test.dart +++ b/test/component/home/navigation_home_test.dart @@ -2,10 +2,10 @@ import "package:flutter/material.dart"; import "package:flutter_test/flutter_test.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:proxima/viewmodels/home_view_model.dart"; -import "package:proxima/views/bottom_navigation_bar/navigation_bar_routes.dart"; -import "package:proxima/views/bottom_navigation_bar/navigation_bottom_bar.dart"; import "package:proxima/views/content/feed/home_feed.dart"; -import "package:proxima/views/leading_back_button/leading_back_button.dart"; +import "package:proxima/views/navigation/bottom_navigation_bar/navigation_bar_routes.dart"; +import "package:proxima/views/navigation/bottom_navigation_bar/navigation_bottom_bar.dart"; +import "package:proxima/views/navigation/leading_back_button/leading_back_button.dart"; import "package:proxima/views/navigation/routes.dart"; import "package:proxima/views/pages/home/home_page.dart"; import "package:proxima/views/pages/new_post/new_post_page.dart"; diff --git a/test/component/home/static_home_test.dart b/test/component/home/static_home_test.dart index 2036e641..0d96fe7c 100644 --- a/test/component/home/static_home_test.dart +++ b/test/component/home/static_home_test.dart @@ -2,12 +2,13 @@ import "package:flutter/material.dart"; import "package:flutter_test/flutter_test.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:proxima/viewmodels/home_view_model.dart"; -import "package:proxima/views/bottom_navigation_bar/navigation_bar_routes.dart"; -import "package:proxima/views/bottom_navigation_bar/navigation_bottom_bar.dart"; import "package:proxima/views/content/feed/home_feed.dart"; import "package:proxima/views/content/feed/post_card/post_card.dart"; +import "package:proxima/views/navigation/bottom_navigation_bar/navigation_bar_routes.dart"; +import "package:proxima/views/navigation/bottom_navigation_bar/navigation_bottom_bar.dart"; import "package:proxima/views/pages/home/home_page.dart"; import "package:proxima/views/pages/home/top_bar/home_top_bar.dart"; + import "../utils/mock_data/home/mock_posts.dart"; void main() { diff --git a/test/component/login_test.dart b/test/component/login_test.dart index d0a5f9fe..dd038675 100644 --- a/test/component/login_test.dart +++ b/test/component/login_test.dart @@ -6,7 +6,7 @@ import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:proxima/main.dart"; import "package:proxima/models/database/user/user_firestore.dart"; import "package:proxima/services/database/user_repository_service.dart"; -import "package:proxima/views/leading_back_button/leading_back_button.dart"; +import "package:proxima/views/navigation/leading_back_button/leading_back_button.dart"; import "package:proxima/views/pages/create_account_page.dart"; import "package:proxima/views/pages/home/home_page.dart"; import "package:proxima/views/pages/login/login_button.dart"; diff --git a/test/component/new_post_test.dart b/test/component/new_post_test.dart index 74f02dba..c1748478 100644 --- a/test/component/new_post_test.dart +++ b/test/component/new_post_test.dart @@ -2,7 +2,7 @@ import "package:firebase_core/firebase_core.dart"; import "package:flutter/material.dart"; import "package:flutter_test/flutter_test.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; -import "package:proxima/views/leading_back_button/leading_back_button.dart"; +import "package:proxima/views/navigation/leading_back_button/leading_back_button.dart"; import "package:proxima/views/pages/new_post/new_post_form.dart"; import "package:proxima/views/pages/new_post/new_post_page.dart";