Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/68 migration to null safety #939

Merged
merged 66 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
74da6e8
Migrate service classes to null safety
XavierPaquet-Rapold Nov 22, 2023
b61dbae
Migrate constants to null safety
XavierPaquet-Rapold Nov 22, 2023
9ff31eb
Migrate utils to null safety
XavierPaquet-Rapold Nov 22, 2023
9eea612
Remove late from GetIt
XavierPaquet-Rapold Nov 22, 2023
536ae08
Change @required to required
XavierPaquet-Rapold Nov 22, 2023
d7fc81a
Migrate models to null safety
XavierPaquet-Rapold Nov 22, 2023
ac2dba1
Migrate main to null safety
XavierPaquet-Rapold Nov 22, 2023
50ce75e
Migrate managers to null safety
XavierPaquet-Rapold Nov 23, 2023
1714af2
Migrate ViewModels to null safety
XavierPaquet-Rapold Dec 21, 2023
1cd67b1
Migrate utils to null safety
XavierPaquet-Rapold Dec 23, 2023
9778d14
Migrate views to null safety
XavierPaquet-Rapold Dec 23, 2023
2f5473a
Migrate Views to null safety
XavierPaquet-Rapold Dec 23, 2023
e2a44bc
Migrate mocks to null safety
XavierPaquet-Rapold Jan 4, 2024
ebc9dae
Use late for all tests
XavierPaquet-Rapold Jan 4, 2024
14b8317
Fix service tests
XavierPaquet-Rapold Jan 4, 2024
c831dd6
Migrate helpers to null safety
XavierPaquet-Rapold Jan 4, 2024
db1fddf
Migrate managers tests to null safety
XavierPaquet-Rapold Jan 4, 2024
62008cc
Migrate ViewModel tests to null safety
XavierPaquet-Rapold Jan 4, 2024
e71aa05
Managers use mocks for managers
XavierPaquet-Rapold Jan 4, 2024
0c2e222
Migrate widget tests to null safety
XavierPaquet-Rapold Jan 4, 2024
3e1f938
Migrate views tests to null safety
XavierPaquet-Rapold Jan 4, 2024
1ecb121
Fix course_repository_test
XavierPaquet-Rapold Jan 5, 2024
bbb3f05
Fix QuickLinkRepository tests
XavierPaquet-Rapold Jan 5, 2024
e2982b6
Fix SettingsManagerTests
XavierPaquet-Rapold Jan 5, 2024
06e1bab
Fix user repository tests
XavierPaquet-Rapold Jan 5, 2024
bccb64c
Fix GradeEvaluationTile tests
XavierPaquet-Rapold Jan 8, 2024
112f050
Fix code problems
XavierPaquet-Rapold Jan 8, 2024
17d0426
Fix DashboardViewModel tests
XavierPaquet-Rapold Jan 8, 2024
00ab827
Fix FeedbackViewModelTest
XavierPaquet-Rapold Jan 13, 2024
ab9255a
Fix GradeViewModel tests
XavierPaquet-Rapold Jan 13, 2024
3d907e8
Fix UserRepositoryMock tests
XavierPaquet-Rapold Jan 13, 2024
1d57405
Fix ScheduleSettingsViewModel tests
XavierPaquet-Rapold Jan 13, 2024
812c59c
Fix ScheduleViewModel tests
XavierPaquet-Rapold Jan 13, 2024
32b1e9d
Fix GradeDetailsView tests
XavierPaquet-Rapold Jan 19, 2024
0c59936
Fix NotFoundView test
XavierPaquet-Rapold Jan 20, 2024
455db7e
Fix GradeDetailsViewModel tests
XavierPaquet-Rapold Jan 21, 2024
2bc71d7
Fix ScheduleViewModel tests
XavierPaquet-Rapold Jan 22, 2024
a788030
Remove use of Future OnError
XavierPaquet-Rapold Mar 9, 2024
94eb2da
Fix ScheduleSettingTest tests
XavierPaquet-Rapold Mar 9, 2024
9ca3608
test: Fix settings loading issue
apomalyn Mar 9, 2024
aa5ebf4
Fix DashboardViewModelTest tests
XavierPaquet-Rapold Mar 9, 2024
9962c86
test: Fix settings loading issue
apomalyn Mar 9, 2024
36b433b
test: Remove useless test
apomalyn Mar 9, 2024
6dcc322
Fix ScheduleViewModel marker not appearing
XavierPaquet-Rapold Mar 9, 2024
37f961f
Fix courses not appearing when no review
XavierPaquet-Rapold Mar 9, 2024
b82a43a
Update CI and documentation
XavierPaquet-Rapold Mar 9, 2024
d8a154b
[BOT] Applying version.
XavierPaquet-Rapold Mar 9, 2024
2575af0
[BOT] Applying format.
clubapplets-server Mar 9, 2024
2167887
Fix analyze
XavierPaquet-Rapold Mar 9, 2024
df2e47a
Fix Golden
XavierPaquet-Rapold Mar 9, 2024
1587f09
[BOT] Applying format.
XavierPaquet-Rapold Mar 9, 2024
d155189
Update pumpAndSettle duration
XavierPaquet-Rapold Mar 9, 2024
9b6160a
Merge branch 'feature/68-migration-to-null-safety' of https://github.…
XavierPaquet-Rapold Mar 9, 2024
07727a6
[BOT] Update golden files
XavierPaquet-Rapold Mar 9, 2024
f25d168
Fix workflows
XavierPaquet-Rapold Mar 9, 2024
312b636
Merge branch 'feature/68-migration-to-null-safety' of https://github.…
XavierPaquet-Rapold Mar 9, 2024
ddf2202
Try to fix grades_details_view_test golden
XavierPaquet-Rapold Mar 10, 2024
eb722a3
[BOT] Applying format.
XavierPaquet-Rapold Mar 10, 2024
238ae35
Try fixing grade_details_view_test
XavierPaquet-Rapold Mar 10, 2024
a40edc4
Merge remote-tracking branch 'origin/feature/68-migration-to-null-saf…
XavierPaquet-Rapold Mar 10, 2024
56a2a38
Fix course evaluation bug and set appVersion
XavierPaquet-Rapold Mar 12, 2024
8a03d5a
[BOT] Applying format.
XavierPaquet-Rapold Mar 12, 2024
6e544f9
Add analytics
XavierPaquet-Rapold Mar 13, 2024
18709ba
Merge branch 'feature/68-migration-to-null-safety' of https://github.…
XavierPaquet-Rapold Mar 13, 2024
a199f96
Chang log
XavierPaquet-Rapold Mar 13, 2024
f2e374e
Add analytics
XavierPaquet-Rapold Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/dev-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ jobs:
ENCRYPTED_GOOGLE_SERVICE_PASSWORD: ${{ secrets.ENCRYPTED_GOOGLE_SERVICE_PASSWORD }}

# Get flutter dependencies.
- run: flutter pub get
- run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs

# Check the format of the code and commit the formatted files.
- name: Format files in lib and test directories
Expand Down Expand Up @@ -174,6 +176,7 @@ jobs:
if: matrix.target == 'iOS'
run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd ios
pod update
flutter clean
Expand All @@ -197,7 +200,9 @@ jobs:
exit 1

# Get dependencies and decrypt needed files.
- run: flutter pub get
- run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs

- name: Decrypt SignETS certificate and Google Services files
run: |
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/master-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ jobs:
ENCRYPTED_GOOGLE_SERVICE_PASSWORD: ${{ secrets.ENCRYPTED_GOOGLE_SERVICE_PASSWORD }}

# Get flutter dependencies.
- run: flutter pub get
- run : |
flutter pub get
dart run build_runner build --delete-conflicting-outputs

# Check if the code has any errors/warnings
- name: Analyze code
Expand Down Expand Up @@ -176,12 +178,15 @@ jobs:
if: matrix.target == 'iOS'
run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd ios
pod install
flutter clean

# Get dependencies and decrypt needed files.
- run: flutter pub get
- run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs

- name: Decrypt SignETS certificate and Google Services files
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ jobs:
if: matrix.target == 'iOS'
run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd ios
pod install
flutter clean
- run: flutter doctor -v

# Get dependencies and decrypt needed files.
- run: flutter pub get
- run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs

- name: Decrypt certificates files
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ app_untranslated_messages.yaml

# Flutter test
test/**/failures/
test/mock/**/*.mocks.dart

# Certificates and secrets
assets/certificates/
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ chmod +x ./env_variables.sh
flutter pub get
```

- To generate the mocks:
```
dart run build_runner build
```

## Add environment variable for API_KEY

- To add the Google Maps API TOKEN and the GitHub API TOKEN, you need to rename the file `.env.template` into `.env`. In
Expand Down
7 changes: 2 additions & 5 deletions lib/core/constants/preferences_flags.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Flutter imports:
import 'package:flutter/cupertino.dart';

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

Expand Down Expand Up @@ -62,8 +59,8 @@ class DynamicPreferencesFlag {
PreferencesFlag groupAssociationFlag;

DynamicPreferencesFlag(
{@required this.groupAssociationFlag,
@required this.uniqueKey,
{required this.groupAssociationFlag,
required this.uniqueKey,
this.separator = "_"});

String get data => groupAssociationFlag.toString() + separator + uniqueKey;
Expand Down
4 changes: 2 additions & 2 deletions lib/core/constants/widget_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ enum WidgetType { progress, grades }
/// The extension corresponding to WidgetType to get associated constants
extension WidgetTypeExtension on WidgetType {
/// ID used by iOS systems to update the corresponding widget
String get iOSname {
String? get iOSname {
switch (this) {
case WidgetType.progress:
return 'ETSMobile_ProgressWidget';
Expand All @@ -22,7 +22,7 @@ extension WidgetTypeExtension on WidgetType {
///
/// Another option would be to use qualifiedAndroidName instead of androidName
/// (see home_widget's updateWidget method for more info)
String get androidName {
String? get androidName {
switch (this) {
case WidgetType.progress:
return 'ProgressWidgetProvider';
Expand Down
2 changes: 1 addition & 1 deletion lib/core/managers/cache_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CacheManager {
/// Get from the cache the value associated with [key].
/// Throw a [CacheException] if the [key] doesn't exist.
Future<String> get(String key) async {
final lib.FileInfo fileInfo = await _cacheManager.getFileFromCache(key);
final lib.FileInfo? fileInfo = await _cacheManager.getFileFromCache(key);

if (fileInfo == null) {
_analyticsService.logEvent(
Expand Down
Loading
Loading