Skip to content

Commit

Permalink
Pfe master (#999)
Browse files Browse the repository at this point in the history
* lib folder feature-first structure (#996)

* lib folder feature-first structure

* [BOT] Applying version.

* feature-first changes + build working

* tests import fixed

* [BOT] Applying pod update.

---------

Co-authored-by: XavierPaquet-Rapold <[email protected]>
Co-authored-by: Hzdotexe <[email protected]>

* refactoring ets + delete unused imports

* Fixe events structure

* Fix events structure

---------

Co-authored-by: XavierPaquet-Rapold <[email protected]>
Co-authored-by: Hzdotexe <[email protected]>
Co-authored-by: Xavier Paquet-Rapold <[email protected]>
  • Loading branch information
4 people authored Jun 23, 2024
1 parent 74eb079 commit c199ad7
Show file tree
Hide file tree
Showing 226 changed files with 773 additions and 774 deletions.
2 changes: 0 additions & 2 deletions .env.template

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import 'package:firebase_remote_config/firebase_remote_config.dart';

// Project imports:
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/utils/locator.dart';

//OTHERS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'package:device_info_plus/device_info_plus.dart';
import 'package:package_info_plus/package_info_plus.dart';

// Project imports:
import 'package:notredame/core/services/networking_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/integration/networking_service.dart';
import 'package:notredame/utils/locator.dart';

// UTILS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:rive/rive.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/core/viewmodels/not_found_viewmodel.dart';
import 'package:notredame/ui/utils/app_theme.dart';
import 'package:notredame/features/app/error/not_found/not_found_viewmodel.dart';
import 'package:notredame/utils/app_theme.dart';

class NotFoundView extends StatefulWidget {
final String? pageName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'package:rive/rive.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/core/constants/router_paths.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/navigation_service.dart';
import 'package:notredame/core/services/rive_animation_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/navigation/router_paths.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/navigation/navigation_service.dart';
import 'package:notredame/features/app/presentation/rive_animation_service.dart';
import 'package:notredame/utils/locator.dart';

class NotFoundViewModel extends BaseViewModel {
static const String tag = "NotFoundViewModel";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/core/constants/urls.dart';
import 'package:notredame/core/utils/utils.dart';
import 'package:notredame/core/viewmodels/outage_viewmodel.dart';
import 'package:notredame/ui/utils/app_theme.dart';
import 'package:notredame/constants/urls.dart';
import 'package:notredame/utils/utils.dart';
import 'package:notredame/features/app/error/outage/outage_viewmodel.dart';
import 'package:notredame/utils/app_theme.dart';

class OutageView extends StatelessWidget {
@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/core/constants/router_paths.dart';
import 'package:notredame/core/services/navigation_service.dart';
import 'package:notredame/core/services/remote_config_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/ui/views/startup_view.dart';
import 'package:notredame/features/app/navigation/router_paths.dart';
import 'package:notredame/features/app/navigation/navigation_service.dart';
import 'package:notredame/features/app/analytics/remote_config_service.dart';
import 'package:notredame/utils/locator.dart';
import 'package:notredame/features/app/startup/startup_view.dart';

class OutageViewModel extends BaseViewModel {
int _lastTap = DateTime.now().millisecondsSinceEpoch;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import 'package:package_info_plus/package_info_plus.dart';
import 'package:path_provider/path_provider.dart';

// Project imports:
import 'package:notredame/core/models/feedback_issue.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/internal_info_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/more/feedback/models/feedback_issue.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/error/internal_info_service.dart';
import 'package:notredame/utils/locator.dart';

class GithubApi {
static const String tag = "GithubApi";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:flutter_custom_tabs/flutter_custom_tabs.dart' as custom_tabs;
import 'package:url_launcher/url_launcher.dart' as url_launch;

// Project imports:
import 'package:notredame/core/managers/settings_manager.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/ui/utils/app_theme.dart';
import 'package:notredame/features/more/settings/settings_manager.dart';
import 'package:notredame/utils/locator.dart';
import 'package:notredame/utils/app_theme.dart';

class LaunchUrlService {
final SettingsManager settingsManager = locator<SettingsManager>();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import 'package:feature_discovery/feature_discovery.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// Project imports:
import 'package:notredame/core/constants/discovery_ids.dart';
import 'package:notredame/core/constants/router_paths.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/navigation_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/ui/utils/app_theme.dart';
import 'package:notredame/ui/utils/discovery_components.dart';
import 'package:notredame/features/welcome/discovery/models/discovery_ids.dart';
import 'package:notredame/features/app/navigation/router_paths.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/navigation/navigation_service.dart';
import 'package:notredame/utils/locator.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/features/welcome/discovery/discovery_components.dart';

/// Bottom navigation bar for the application.
class NavRail extends StatefulWidget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import 'package:flutter/material.dart';

// Project imports:
import 'package:notredame/core/constants/router_paths.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/remote_config_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/navigation/router_paths.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/analytics/remote_config_service.dart';
import 'package:notredame/utils/locator.dart';

//SERVICE

Expand Down
52 changes: 26 additions & 26 deletions lib/ui/router.dart → lib/features/app/navigation/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ import 'package:flutter/material.dart';
import 'package:ets_api_clients/models.dart';

// Project imports:
import 'package:notredame/core/constants/router_paths.dart';
import 'package:notredame/core/constants/update_code.dart';
import 'package:notredame/core/models/quick_link.dart';
import 'package:notredame/ui/views/about_view.dart';
import 'package:notredame/ui/views/author_view.dart';
import 'package:notredame/ui/views/choose_language_view.dart';
import 'package:notredame/ui/views/contributors_view.dart';
import 'package:notredame/ui/views/dashboard_view.dart';
import 'package:notredame/ui/views/ets_view.dart';
import 'package:notredame/ui/views/faq_view.dart';
import 'package:notredame/ui/views/feedback_view.dart';
import 'package:notredame/ui/views/grade_details_view.dart';
import 'package:notredame/ui/views/login_view.dart';
import 'package:notredame/ui/views/more_view.dart';
import 'package:notredame/ui/views/news_details_view.dart';
import 'package:notredame/ui/views/news_view.dart';
import 'package:notredame/ui/views/not_found_view.dart';
import 'package:notredame/ui/views/outage_view.dart';
import 'package:notredame/ui/views/quick_links_view.dart';
import 'package:notredame/ui/views/schedule_default_view.dart';
import 'package:notredame/ui/views/schedule_view.dart';
import 'package:notredame/ui/views/security_view.dart';
import 'package:notredame/ui/views/settings_view.dart';
import 'package:notredame/ui/views/startup_view.dart';
import 'package:notredame/ui/views/student_view.dart';
import 'package:notredame/ui/widgets/link_web_view.dart';
import 'package:notredame/features/app/navigation/router_paths.dart';
import 'package:notredame/constants/update_code.dart';
import 'package:notredame/features/ets/events/author/author_view.dart';
import 'package:notredame/features/ets/ets_view.dart';
import 'package:notredame/features/ets/events/news/news-details/news_details_view.dart';
import 'package:notredame/features/ets/events/news/news_view.dart';
import 'package:notredame/features/ets/quick-link/models/quick_link.dart';
import 'package:notredame/features/more/about/about_view.dart';
import 'package:notredame/features/more/settings/choose_language_view.dart';
import 'package:notredame/features/more/contributors/contributors_view.dart';
import 'package:notredame/features/dashboard/dashboard_view.dart';
import 'package:notredame/features/more/faq/faq_view.dart';
import 'package:notredame/features/more/feedback/feedback_view.dart';
import 'package:notredame/features/student/grades/grade_details/grade_details_view.dart';
import 'package:notredame/features/welcome/login/login_view.dart';
import 'package:notredame/features/more/more_view.dart';
import 'package:notredame/features/app/error/not_found/not_found_view.dart';
import 'package:notredame/features/app/error/outage/outage_view.dart';
import 'package:notredame/features/ets/quick-link/quick_links_view.dart';
import 'package:notredame/features/schedule/schedule_default/schedule_default_view.dart';
import 'package:notredame/features/schedule/schedule_view.dart';
import 'package:notredame/features/ets/quick-link/widgets/security-info/security_view.dart';
import 'package:notredame/features/more/settings/settings_view.dart';
import 'package:notredame/features/app/startup/startup_view.dart';
import 'package:notredame/features/student/student_view.dart';
import 'package:notredame/features/app/widgets/link_web_view.dart';

Route<dynamic> generateRoute(RouteSettings routeSettings) {
switch (routeSettings.name) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/services.dart';
import 'package:rive/rive.dart';

// Project imports:
import 'package:notredame/core/utils/animation_exception.dart';
import 'package:notredame/utils/animation_exception.dart';

/// Manage the rive animation for the application
class RiveAnimationService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:ets_api_clients/clients.dart';
import 'package:ets_api_clients/models.dart';

// Project imports:
import 'package:notredame/locator.dart';
import 'package:notredame/utils/locator.dart';

/// Repository to access authors
class AuthorRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import 'package:ets_api_clients/models.dart';
import 'package:logger/logger.dart';

// Project imports:
import 'package:notredame/core/constants/semester_codes.dart';
import 'package:notredame/core/managers/cache_manager.dart';
import 'package:notredame/core/managers/user_repository.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/networking_service.dart';
import 'package:notredame/core/utils/cache_exception.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/storage/cache_manager.dart';
import 'package:notredame/features/app/repository/user_repository.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/integration/networking_service.dart';
import 'package:notredame/features/student/semester_codes.dart';
import 'package:notredame/utils/cache_exception.dart';
import 'package:notredame/utils/locator.dart';

/// Repository to access all the data related to courses taken by the student
class CourseRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:ets_api_clients/clients.dart';
import 'package:ets_api_clients/models.dart';

// Project imports:
import 'package:notredame/core/managers/cache_manager.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/storage/cache_manager.dart';
import 'package:notredame/utils/locator.dart';

/// Repository to access all the news
class NewsRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import 'dart:convert';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// Project imports:
import 'package:notredame/core/constants/quick_links.dart';
import 'package:notredame/core/managers/cache_manager.dart';
import 'package:notredame/core/models/quick_link.dart';
import 'package:notredame/core/models/quick_link_data.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/ets/quick-link/models/quick_links.dart';
import 'package:notredame/features/app/storage/cache_manager.dart';
import 'package:notredame/features/ets/quick-link/models/quick_link.dart';
import 'package:notredame/features/ets/quick-link/models/quick_link_data.dart';
import 'package:notredame/utils/locator.dart';

class QuickLinkRepository {
final CacheManager _cacheManager = locator<CacheManager>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:logger/logger.dart';

// Project imports:
import 'package:notredame/core/managers/cache_manager.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/networking_service.dart';
import 'package:notredame/core/utils/cache_exception.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/storage/cache_manager.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/integration/networking_service.dart';
import 'package:notredame/utils/cache_exception.dart';
import 'package:notredame/utils/locator.dart';

class UserRepository {
static const String tag = "UserRepository";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/core/utils/utils.dart';
import 'package:notredame/core/viewmodels/startup_viewmodel.dart';
import 'package:notredame/ui/utils/app_theme.dart';
import 'package:notredame/utils/utils.dart';
import 'package:notredame/features/app/startup/startup_viewmodel.dart';
import 'package:notredame/utils/app_theme.dart';

class StartUpView extends StatelessWidget {
@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/core/constants/preferences_flags.dart';
import 'package:notredame/core/constants/router_paths.dart';
import 'package:notredame/core/constants/update_code.dart';
import 'package:notredame/core/managers/settings_manager.dart';
import 'package:notredame/core/managers/user_repository.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/internal_info_service.dart';
import 'package:notredame/core/services/navigation_service.dart';
import 'package:notredame/core/services/networking_service.dart';
import 'package:notredame/core/services/preferences_service.dart';
import 'package:notredame/core/services/siren_flutter_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/constants/preferences_flags.dart';
import 'package:notredame/features/app/navigation/router_paths.dart';
import 'package:notredame/constants/update_code.dart';
import 'package:notredame/features/more/settings/settings_manager.dart';
import 'package:notredame/features/app/repository/user_repository.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/error/internal_info_service.dart';
import 'package:notredame/features/app/navigation/navigation_service.dart';
import 'package:notredame/features/app/integration/networking_service.dart';
import 'package:notredame/features/app/storage/preferences_service.dart';
import 'package:notredame/features/app/storage/siren_flutter_service.dart';
import 'package:notredame/utils/locator.dart';

class StartUpViewModel extends BaseViewModel {
/// Manage the settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'dart:convert';
import 'package:flutter_cache_manager/flutter_cache_manager.dart' as lib;

// Project imports:
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/utils/cache_exception.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/utils/cache_exception.dart';
import 'package:notredame/utils/locator.dart';

/// Abstraction of the cache management system.
class CacheManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import 'package:shared_preferences/shared_preferences.dart';

// Project imports:
import 'package:notredame/core/constants/preferences_flags.dart';
import 'package:notredame/constants/preferences_flags.dart';

// CONSTANT

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import 'package:flutter/services.dart';
import 'package:home_widget/home_widget.dart';

// Project imports:
import 'package:notredame/core/constants/widget_helper.dart';
import 'package:notredame/core/models/widget_models.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/constants/widget_helper.dart';
import 'package:notredame/features/student/grades/widget_models.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/utils/locator.dart';

// MODEL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// Project imports:
import 'package:notredame/core/services/networking_service.dart';
import 'package:notredame/core/utils/utils.dart';
import 'package:notredame/locator.dart';
import 'package:notredame/ui/utils/app_theme.dart';
import 'package:notredame/ui/widgets/bottom_bar.dart';
import 'package:notredame/ui/widgets/navigation_rail.dart';
import 'package:notredame/ui/utils/loading.dart';
import 'package:notredame/features/app/integration/networking_service.dart';
import 'package:notredame/features/app/navigation/navigation_rail.dart';
import 'package:notredame/utils/utils.dart';
import 'package:notredame/utils/locator.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/utils/loading.dart';
import 'package:notredame/features/app/widgets/bottom_bar.dart';

/// Basic Scaffold to avoid boilerplate code in the application.
/// Contains a loader controlled by [_isLoading]
Expand Down
Loading

0 comments on commit c199ad7

Please sign in to comment.