Skip to content

Commit

Permalink
Cicd/order imports automatically (#860)
Browse files Browse the repository at this point in the history
* Update imports

* Test

* Test

* test

* test

* Test

* Nice

* [BOT] Applying version.

---------

Co-authored-by: camillebrulotte <[email protected]>
  • Loading branch information
camillebrulotte and camillebrulotte authored Oct 3, 2023
1 parent fa724ea commit 37ba6dc
Show file tree
Hide file tree
Showing 177 changed files with 1,263 additions and 1,579 deletions.
3 changes: 2 additions & 1 deletion .githooks/pre-commit
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash

flutter format .
flutter pub run import_sorter:main
flutter format .
5 changes: 4 additions & 1 deletion lib/core/constants/custom_feedback_localization.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:feedback/feedback.dart';
// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:feedback/feedback.dart';

abstract class CustomFeedbackLocalizations implements FeedbackLocalizations {
String get email;
}
Expand Down
3 changes: 3 additions & 0 deletions lib/core/constants/emergency_procedures.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// Project imports:
import 'package:notredame/core/models/emergency_procedure.dart';

List<EmergencyProcedure> emergencyProcedures(AppIntl intl) => [
Expand Down
8 changes: 3 additions & 5 deletions lib/core/constants/faq.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

// MODELS
// Project imports:
import 'package:notredame/core/constants/app_info.dart';
import 'package:notredame/core/models/faq_actions.dart';
import 'package:notredame/core/models/faq_questions.dart';

// CONSTANTS
import 'package:notredame/core/constants/app_info.dart';

class Faq {
List<QuestionItem> questions = [
QuestionItem(
Expand Down
3 changes: 2 additions & 1 deletion lib/core/constants/markers.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:google_maps_flutter/google_maps_flutter.dart';
// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

List<Marker> markers(AppIntl intl) => [
Marker(
Expand Down
5 changes: 4 additions & 1 deletion lib/core/constants/preferences_flags.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:enum_to_string/enum_to_string.dart';
// Flutter imports:
import 'package:flutter/cupertino.dart';

// Package imports:
import 'package:enum_to_string/enum_to_string.dart';

enum PreferencesFlag {
// Meta flag concerning the app versioning
appVersion,
Expand Down
10 changes: 5 additions & 5 deletions lib/core/constants/quick_links.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/widgets.dart';

// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// MODELS
// Project imports:
import 'package:notredame/core/models/quick_link.dart';

// UTILS
import 'package:notredame/ui/utils/app_theme.dart';

List<QuickLink> quickLinks(AppIntl intl) => [
Expand Down
7 changes: 3 additions & 4 deletions lib/core/managers/cache_manager.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// FLUTTER / DART / THIRD-PARTIES
// Dart imports:
import 'dart:convert';

// Package imports:
import 'package:flutter_cache_manager/flutter_cache_manager.dart' as lib;

// SERVICES
// Project imports:
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/utils/cache_exception.dart';

// OTHER
import 'package:notredame/locator.dart';

/// Abstraction of the cache management system.
Expand Down
24 changes: 11 additions & 13 deletions lib/core/managers/course_repository.dart
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
// FLUTTER / DART / THIRD-PARTIES
// Dart imports:
import 'dart:convert';

// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:ets_api_clients/clients.dart';
import 'package:ets_api_clients/exceptions.dart';
import 'package:ets_api_clients/models.dart';
import 'package:logger/logger.dart';

// SERVICES
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/networking_service.dart';
// Project imports:
import 'package:notredame/core/managers/cache_manager.dart';
import 'package:notredame/core/managers/user_repository.dart';

// MODELS
import 'package:ets_api_clients/models.dart';

// UTILS
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:ets_api_clients/exceptions.dart';

// OTHER
import 'package:notredame/locator.dart';
import 'package:ets_api_clients/clients.dart';

/// Repository to access all the data related to courses taken by the student
class CourseRepository {
Expand Down
14 changes: 5 additions & 9 deletions lib/core/managers/quick_link_repository.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
// FLUTTER / DART / THIRD-PARTIES
// Dart imports:
import 'dart:convert';

// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// SERVICES
// Project imports:
import 'package:notredame/core/constants/quick_links.dart';
import 'package:notredame/core/managers/cache_manager.dart';

// MODELS
import 'package:notredame/core/models/quick_link.dart';
import 'package:notredame/core/models/quick_link_data.dart';

// CONSTANTS
import 'package:notredame/core/constants/quick_links.dart';

// OTHERS
import 'package:notredame/locator.dart';

class QuickLinkRepository {
Expand Down
16 changes: 7 additions & 9 deletions lib/core/managers/settings_manager.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:calendar_view/calendar_view.dart';
import 'package:enum_to_string/enum_to_string.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:intl/intl.dart';
import 'package:logger/logger.dart';
import 'package:table_calendar/table_calendar.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// SERVICES
// Project imports:
import 'package:notredame/core/constants/preferences_flags.dart';
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/preferences_service.dart';
import 'package:notredame/core/services/remote_config_service.dart';

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

// OTHER
import 'package:notredame/locator.dart';

class SettingsManager with ChangeNotifier {
Expand Down
21 changes: 9 additions & 12 deletions lib/core/managers/user_repository.dart
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
// FLUTTER / DART / THIRD-PARTIES
// Dart imports:
import 'dart:convert';

// Flutter imports:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

// Package imports:
import 'package:ets_api_clients/clients.dart';
import 'package:ets_api_clients/exceptions.dart';
import 'package:ets_api_clients/models.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:logger/logger.dart';

// SERVICES
// 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/managers/cache_manager.dart';

// MODELS
import 'package:ets_api_clients/models.dart';

// UTILS
import 'package:ets_api_clients/exceptions.dart';
import 'package:notredame/core/utils/cache_exception.dart';

// OTHER
import 'package:notredame/locator.dart';
import 'package:ets_api_clients/clients.dart';

class UserRepository {
static const String tag = "UserRepository";
Expand Down
2 changes: 1 addition & 1 deletion lib/core/models/discovery.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

class Discovery {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/models/emergency_procedure.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

class EmergencyProcedure {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/models/faq_actions.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

class ActionItem {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/models/faq_questions.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

class QuestionItem {
Expand Down
1 change: 1 addition & 0 deletions lib/core/models/feedback_issue.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package imports:
import 'package:github/github.dart';

class FeedbackIssue {
Expand Down
4 changes: 2 additions & 2 deletions lib/core/models/group_discovery.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

// MODELS
// Project imports:
import 'package:notredame/core/models/discovery.dart';

class GroupDiscovery {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/models/quick_link.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

class QuickLink {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/models/quick_link_data.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

class QuickLinkData {
Expand Down
1 change: 1 addition & 0 deletions lib/core/models/widget_models.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Flutter imports:
import 'package:flutter/foundation.dart';

class GradesWidgetData {
Expand Down
6 changes: 4 additions & 2 deletions lib/core/services/analytics_service.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/material.dart';

/// Manage the analytics of the application
class AnalyticsService {
Expand Down
14 changes: 9 additions & 5 deletions lib/core/services/app_widget_service.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
// FLUTTER / DART / THIRD-PARTIES
// Flutter imports:
import 'package:flutter/services.dart';

// Package imports:
import 'package:home_widget/home_widget.dart';

// MODEL
// 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';

// MODEL

// CONSTANTS
import 'package:notredame/core/constants/widget_helper.dart';

// MANAGER / SERVICE
import 'package:notredame/core/services/analytics_service.dart';

// OTHER
import 'package:notredame/locator.dart';

/// Manage the app widget function to update data and visual.
class AppWidgetService {
Expand Down
20 changes: 10 additions & 10 deletions lib/core/services/github_api.dart
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// FLUTTER / DART / THIRD-PARTIES
// Dart imports:
import 'dart:convert';
import 'dart:io';

// Flutter imports:
import 'package:flutter/foundation.dart';

// Package imports:
import 'package:flutter_config/flutter_config.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:github/github.dart';
import 'package:logger/logger.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:path_provider/path_provider.dart';
import 'package:flutter_config/flutter_config.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// SERVICES
import 'package:notredame/core/services/internal_info_service.dart';
import 'package:notredame/core/services/analytics_service.dart';

// MODELS
// Project imports:
import 'package:notredame/core/models/feedback_issue.dart';

// OTHERS
import 'package:notredame/core/services/analytics_service.dart';
import 'package:notredame/core/services/internal_info_service.dart';
import 'package:notredame/locator.dart';

class GithubApi {
Expand Down
6 changes: 4 additions & 2 deletions lib/core/services/in_app_review_service.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// FLUTTER / DART / THIRD-PARTIES
// Package imports:
import 'package:in_app_review/in_app_review.dart';

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

// CONSTANTS

/// Manage the analytics of the application
class InAppReviewService {
final InAppReview _inAppReview = InAppReview.instance;
Expand Down
10 changes: 7 additions & 3 deletions lib/core/services/internal_info_service.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// FLUTTER / DART / THIRD-PARTIES
// Dart imports:
import 'dart:io';

// Package imports:
import 'package:device_info_plus/device_info_plus.dart';
import 'package:package_info_plus/package_info_plus.dart';

// UTILS
// Project imports:
import 'package:notredame/core/services/networking_service.dart';
import 'package:notredame/locator.dart';

// UTILS

// SERVICES
import 'package:notredame/core/services/networking_service.dart';

class InternalInfoService {
// Build the error message with the current device informations
Expand Down
Loading

0 comments on commit 37ba6dc

Please sign in to comment.