diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index f32f1a4a2..3aa29e170 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -55,8 +55,8 @@ jobs:
needs: [bump_version]
env:
PROPERTIES_PATH: "android/key.properties"
- JAVA_VERSION: "11.x"
- FLUTTER_VERSION: "3.10.6"
+ JAVA_VERSION: "17.x"
+ FLUTTER_VERSION: "3.13.7"
defaults:
run:
working-directory: ./uni
diff --git a/.github/workflows/format_lint_test.yaml b/.github/workflows/format_lint_test.yaml
index 0fb4e2d6d..8c6bb615b 100644
--- a/.github/workflows/format_lint_test.yaml
+++ b/.github/workflows/format_lint_test.yaml
@@ -4,8 +4,8 @@ on:
branches: [master, develop]
env:
- FLUTTER_VERSION: 3.10.6
- JAVA_VERSION: 11.x
+ FLUTTER_VERSION: 3.13.7
+ JAVA_VERSION: 17.x
jobs:
format:
diff --git a/uni/android/app/build.gradle b/uni/android/app/build.gradle
index 8fe00a408..abcdccc32 100644
--- a/uni/android/app/build.gradle
+++ b/uni/android/app/build.gradle
@@ -32,7 +32,11 @@ if (keystorePropertiesFile.exists()) {
}
android {
- compileSdkVersion 33 // default is flutter.compileSdkVersion
+ if (project.android.hasProperty("namespace")) {
+ namespace "pt.up.fe.ni.uni"
+ }
+
+ compileSdkVersion 34 // default is flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
@@ -51,7 +55,7 @@ android {
defaultConfig {
applicationId "pt.up.fe.ni.uni"
minSdkVersion 21 // default is flutter.minSdkVersion
- targetSdkVersion 33 // default is flutter.targetSdkVersion
+ targetSdkVersion 34 // default is flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
diff --git a/uni/android/build.gradle b/uni/android/build.gradle
index 8dd3ad838..db859f3a9 100644
--- a/uni/android/build.gradle
+++ b/uni/android/build.gradle
@@ -1,6 +1,6 @@
buildscript {
- ext.kotlin_version = '1.7.21'
- ext.android_plugin_version = '7.2.0'
+ ext.kotlin_version = '1.9.0'
+ ext.android_plugin_version = '8.0.0'
repositories {
google()
diff --git a/uni/android/gradle/wrapper/gradle-wrapper.properties b/uni/android/gradle/wrapper/gradle-wrapper.properties
index 6b665338b..89e56bdb6 100644
--- a/uni/android/gradle/wrapper/gradle-wrapper.properties
+++ b/uni/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
diff --git a/uni/app_version.txt b/uni/app_version.txt
index a8e28fe3c..76f04fb93 100644
--- a/uni/app_version.txt
+++ b/uni/app_version.txt
@@ -1 +1 @@
-1.7.13+203
\ No newline at end of file
+1.7.19+209
\ No newline at end of file
diff --git a/uni/ios/Podfile b/uni/ios/Podfile
index 45cb6dd31..15c570493 100644
--- a/uni/ios/Podfile
+++ b/uni/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '11.0'
+# platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/uni/ios/Runner.xcodeproj/project.pbxproj b/uni/ios/Runner.xcodeproj/project.pbxproj
index a8c70480b..a63fc805e 100644
--- a/uni/ios/Runner.xcodeproj/project.pbxproj
+++ b/uni/ios/Runner.xcodeproj/project.pbxproj
@@ -197,6 +197,7 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ BDCB52892DCE94F196BB76DB /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -296,7 +297,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
A202455463DBDFBE5F69F3CD /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
@@ -342,6 +343,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
+ BDCB52892DCE94F196BB76DB /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -433,7 +451,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -452,7 +470,7 @@
DEVELOPMENT_TEAM = ADS6V5HXNQ;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -606,7 +624,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -655,7 +673,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -676,7 +694,7 @@
DEVELOPMENT_TEAM = ADS6V5HXNQ;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -700,7 +718,7 @@
DEVELOPMENT_TEAM = ADS6V5HXNQ;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
diff --git a/uni/ios/Runner/Info.plist b/uni/ios/Runner/Info.plist
index 97a28b8e5..c5d021d70 100644
--- a/uni/ios/Runner/Info.plist
+++ b/uni/ios/Runner/Info.plist
@@ -49,6 +49,8 @@
UISceneConfigurations
+ UIApplicationSupportsIndirectInputEvents
+
UIBackgroundModes
fetch
@@ -73,7 +75,5 @@
UIViewControllerBasedStatusBarAppearance
- UIApplicationSupportsIndirectInputEvents
-
diff --git a/uni/lib/controller/background_workers/background_callback.dart b/uni/lib/controller/background_workers/background_callback.dart
index bf89d1e07..3f1664db7 100644
--- a/uni/lib/controller/background_workers/background_callback.dart
+++ b/uni/lib/controller/background_workers/background_callback.dart
@@ -8,7 +8,7 @@ import 'package:workmanager/workmanager.dart';
/// (they must not take any arguments, not checked)
const taskMap = {
'pt.up.fe.ni.uni.notificationworker':
- Tuple2(NotificationManager.updateAndTriggerNotifications, true)
+ Tuple2(NotificationManager.updateAndTriggerNotifications, true),
};
@pragma('vm:entry-point')
diff --git a/uni/lib/controller/fetchers/print_fetcher.dart b/uni/lib/controller/fetchers/print_fetcher.dart
index e48e46d35..094015abe 100644
--- a/uni/lib/controller/fetchers/print_fetcher.dart
+++ b/uni/lib/controller/fetchers/print_fetcher.dart
@@ -30,7 +30,7 @@ class PrintFetcher implements SessionDependantFetcher {
'p_tipo_id': '3',
'pct_codigo': session.username,
'p_valor': '1',
- 'p_valor_livre': amount.toStringAsFixed(2).trim().replaceAll('.', ',')
+ 'p_valor_livre': amount.toStringAsFixed(2).trim().replaceAll('.', ','),
};
final headers = {};
diff --git a/uni/lib/controller/fetchers/restaurant_fetcher.dart b/uni/lib/controller/fetchers/restaurant_fetcher.dart
index deb0cf0c3..bd0277acf 100644
--- a/uni/lib/controller/fetchers/restaurant_fetcher.dart
+++ b/uni/lib/controller/fetchers/restaurant_fetcher.dart
@@ -45,7 +45,7 @@ class RestaurantFetcher {
}
final List sigarraMenuEndpoints = [
- '${NetworkRouter.getBaseUrl('feup')}CANTINA.EMENTASHOW'
+ '${NetworkRouter.getBaseUrl('feup')}CANTINA.EMENTASHOW',
];
Future> fetchSigarraRestaurants(Session session) async {
diff --git a/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_api.dart b/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_api.dart
index 24f8e4346..d50099ff5 100644
--- a/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_api.dart
+++ b/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_api.dart
@@ -28,7 +28,7 @@ class ScheduleFetcherApi extends ScheduleFetcher {
{
'pv_codigo': session.username,
'pv_semana_ini': dates.beginWeek,
- 'pv_semana_fim': dates.endWeek
+ 'pv_semana_fim': dates.endWeek,
},
session,
);
diff --git a/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_html.dart b/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_html.dart
index e7e8ea77e..e1117d81e 100644
--- a/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_html.dart
+++ b/uni/lib/controller/fetchers/schedule_fetcher/schedule_fetcher_html.dart
@@ -34,7 +34,7 @@ class ScheduleFetcherHtml extends ScheduleFetcher {
'pv_fest_id': course.festId.toString(),
'pv_ano_lectivo': dates.lectiveYear.toString(),
'p_semana_inicio': dates.beginWeek,
- 'p_semana_fim': dates.endWeek
+ 'p_semana_fim': dates.endWeek,
},
session,
);
diff --git a/uni/lib/controller/local_storage/app_bus_stop_database.dart b/uni/lib/controller/local_storage/app_bus_stop_database.dart
index fa87d324d..7d53884d4 100644
--- a/uni/lib/controller/local_storage/app_bus_stop_database.dart
+++ b/uni/lib/controller/local_storage/app_bus_stop_database.dart
@@ -14,7 +14,7 @@ class AppBusStopDatabase extends AppDatabase {
AppBusStopDatabase()
: super('busstops.db', [
'CREATE TABLE busstops(stopCode TEXT, busCode TEXT)',
- 'CREATE TABLE favoritestops(stopCode TEXT, favorited TEXT)'
+ 'CREATE TABLE favoritestops(stopCode TEXT, favorited TEXT)',
]);
/// Returns a map containing all the data stored in this database.
diff --git a/uni/lib/controller/local_storage/app_exams_database.dart b/uni/lib/controller/local_storage/app_exams_database.dart
index 36264e347..6d86a01c7 100644
--- a/uni/lib/controller/local_storage/app_exams_database.dart
+++ b/uni/lib/controller/local_storage/app_exams_database.dart
@@ -23,7 +23,7 @@ class AppExamsDatabase extends AppDatabase {
'Setembro': '09',
'Outubro': '10',
'Novembro': '11',
- 'Dezembro': '12'
+ 'Dezembro': '12',
};
static const _createScript = '''
diff --git a/uni/lib/controller/local_storage/app_shared_preferences.dart b/uni/lib/controller/local_storage/app_shared_preferences.dart
index faca04476..8c458cbd2 100644
--- a/uni/lib/controller/local_storage/app_shared_preferences.dart
+++ b/uni/lib/controller/local_storage/app_shared_preferences.dart
@@ -32,7 +32,7 @@ class AppSharedPreferences {
static final List defaultFavoriteCards = [
FavoriteWidgetType.schedule,
FavoriteWidgetType.exams,
- FavoriteWidgetType.busStops
+ FavoriteWidgetType.busStops,
];
static const String hiddenExams = 'hidden_exams';
static const String favoriteRestaurants = 'favorite_restaurants';
diff --git a/uni/lib/controller/local_storage/app_user_database.dart b/uni/lib/controller/local_storage/app_user_database.dart
index 4a2eca630..6bbd86d16 100644
--- a/uni/lib/controller/local_storage/app_user_database.dart
+++ b/uni/lib/controller/local_storage/app_user_database.dart
@@ -82,7 +82,7 @@ class AppUserDataDatabase extends AppDatabase {
);
await insertInDatabase('userdata', {
'key': 'feesLimit',
- 'value': feesLimit != null ? feesLimit.toIso8601String() : ''
+ 'value': feesLimit != null ? feesLimit.toIso8601String() : '',
});
}
}
diff --git a/uni/lib/controller/parsers/parser_course_units.dart b/uni/lib/controller/parsers/parser_course_units.dart
index f9a1d7949..b7531a44b 100644
--- a/uni/lib/controller/parsers/parser_course_units.dart
+++ b/uni/lib/controller/parsers/parser_course_units.dart
@@ -84,7 +84,7 @@ List parseCourseUnitsAndCourseAverage(
grade: grade,
ects: double.tryParse(ects),
name: name,
- curricularYear: int.parse(year),
+ curricularYear: int.tryParse(year),
semesterCode: semester,
);
courseUnits.add(courseUnit);
diff --git a/uni/lib/model/entities/bug_report.dart b/uni/lib/model/entities/bug_report.dart
index 075f5306d..adf9673ba 100644
--- a/uni/lib/model/entities/bug_report.dart
+++ b/uni/lib/model/entities/bug_report.dart
@@ -14,6 +14,6 @@ class BugReport {
'text': text,
'email': email,
'bugLabel': bugLabel!.item2,
- 'faculties': faculties
+ 'faculties': faculties,
};
}
diff --git a/uni/lib/model/entities/bus.dart b/uni/lib/model/entities/bus.dart
index ab885019a..fd26f8215 100644
--- a/uni/lib/model/entities/bus.dart
+++ b/uni/lib/model/entities/bus.dart
@@ -20,7 +20,7 @@ class Bus {
return {
'busCode': busCode,
'destination': destination,
- 'direction': direction
+ 'direction': direction,
};
}
}
diff --git a/uni/lib/model/entities/exam.dart b/uni/lib/model/entities/exam.dart
index 450bc27a5..0d27cb1bc 100644
--- a/uni/lib/model/entities/exam.dart
+++ b/uni/lib/model/entities/exam.dart
@@ -66,7 +66,7 @@ class Exam {
String weekDay(AppLocale locale) {
return DateFormat.EEEE(locale.localeCode.languageCode)
.dateSymbols
- .WEEKDAYS[begin.weekday - 1];
+ .WEEKDAYS[begin.weekday % 7];
}
String month(AppLocale locale) {
diff --git a/uni/lib/model/entities/lecture.dart b/uni/lib/model/entities/lecture.dart
index b93aac32c..70f2c1251 100644
--- a/uni/lib/model/entities/lecture.dart
+++ b/uni/lib/model/entities/lecture.dart
@@ -111,7 +111,7 @@ class Lecture {
'room': room,
'teacher': teacher,
'classNumber': classNumber,
- 'occurrId': occurrId
+ 'occurrId': occurrId,
};
}
diff --git a/uni/lib/model/entities/locations/coffee_machine.dart b/uni/lib/model/entities/locations/coffee_machine.dart
index acda7feea..107029e7c 100644
--- a/uni/lib/model/entities/locations/coffee_machine.dart
+++ b/uni/lib/model/entities/locations/coffee_machine.dart
@@ -23,7 +23,7 @@ class CoffeeMachine implements Location {
Map toMap({int? groupId}) {
return {
'floor': floor,
- 'type': locationTypeToString(LocationType.coffeeMachine)
+ 'type': locationTypeToString(LocationType.coffeeMachine),
};
}
}
diff --git a/uni/lib/model/entities/locations/restaurant_location.dart b/uni/lib/model/entities/locations/restaurant_location.dart
index 022f65f9f..bccef3dee 100644
--- a/uni/lib/model/entities/locations/restaurant_location.dart
+++ b/uni/lib/model/entities/locations/restaurant_location.dart
@@ -26,7 +26,7 @@ class RestaurantLocation implements Location {
return {
'floor': floor,
'type': locationTypeToString(LocationType.restaurant),
- 'name': name
+ 'name': name,
};
}
}
diff --git a/uni/lib/model/entities/locations/room_location.dart b/uni/lib/model/entities/locations/room_location.dart
index 4f719bd7a..61e63919f 100644
--- a/uni/lib/model/entities/locations/room_location.dart
+++ b/uni/lib/model/entities/locations/room_location.dart
@@ -25,7 +25,7 @@ class RoomLocation implements Location {
return {
'floor': floor,
'type': locationTypeToString(LocationType.room),
- 'first_room': roomNumber
+ 'first_room': roomNumber,
};
}
}
diff --git a/uni/lib/model/entities/locations/special_room_location.dart b/uni/lib/model/entities/locations/special_room_location.dart
index 274b4cf40..c4cd1013a 100644
--- a/uni/lib/model/entities/locations/special_room_location.dart
+++ b/uni/lib/model/entities/locations/special_room_location.dart
@@ -33,7 +33,7 @@ class SpecialRoomLocation implements Location {
'floor': floor,
'type': locationTypeToString(LocationType.printer),
'first_room': roomNumber,
- 'name': name
+ 'name': name,
};
}
}
diff --git a/uni/lib/model/entities/locations/store_location.dart b/uni/lib/model/entities/locations/store_location.dart
index 05817bc5b..b66ea07ae 100644
--- a/uni/lib/model/entities/locations/store_location.dart
+++ b/uni/lib/model/entities/locations/store_location.dart
@@ -26,7 +26,7 @@ class StoreLocation implements Location {
return {
'floor': floor,
'type': locationTypeToString(LocationType.store),
- 'name': name
+ 'name': name,
};
}
}
diff --git a/uni/lib/model/entities/locations/vending_machine.dart b/uni/lib/model/entities/locations/vending_machine.dart
index f1198a3d8..3f40ec36a 100644
--- a/uni/lib/model/entities/locations/vending_machine.dart
+++ b/uni/lib/model/entities/locations/vending_machine.dart
@@ -23,7 +23,7 @@ class VendingMachine implements Location {
Map toMap({int? groupId}) {
return {
'floor': floor,
- 'type': locationTypeToString(LocationType.vendingMachine)
+ 'type': locationTypeToString(LocationType.vendingMachine),
};
}
}
diff --git a/uni/lib/model/entities/meal.dart b/uni/lib/model/entities/meal.dart
index ab278c832..217bc8b44 100644
--- a/uni/lib/model/entities/meal.dart
+++ b/uni/lib/model/entities/meal.dart
@@ -16,7 +16,7 @@ class Meal {
'type': type,
'name': name,
'date': format.format(date),
- 'id_restaurant': restaurantId
+ 'id_restaurant': restaurantId,
};
}
}
diff --git a/uni/lib/model/entities/trip.dart b/uni/lib/model/entities/trip.dart
index 616ce1c62..459a90446 100644
--- a/uni/lib/model/entities/trip.dart
+++ b/uni/lib/model/entities/trip.dart
@@ -14,7 +14,7 @@ class Trip {
return {
'line': line,
'destination': destination,
- 'timeRemaining': timeRemaining
+ 'timeRemaining': timeRemaining,
};
}
diff --git a/uni/lib/model/providers/startup/profile_provider.dart b/uni/lib/model/providers/startup/profile_provider.dart
index 8c85284fc..349c3d926 100644
--- a/uni/lib/model/providers/startup/profile_provider.dart
+++ b/uni/lib/model/providers/startup/profile_provider.dart
@@ -40,7 +40,7 @@ class ProfileProvider extends StateProviderNotifier {
await Future.wait([
fetchUserFees(session),
fetchUserPrintBalance(session),
- fetchCourseUnitsAndCourseAverages(session)
+ fetchCourseUnitsAndCourseAverages(session),
]);
}
diff --git a/uni/lib/model/providers/startup/session_provider.dart b/uni/lib/model/providers/startup/session_provider.dart
index cfd4276ad..84cbca043 100644
--- a/uni/lib/model/providers/startup/session_provider.dart
+++ b/uni/lib/model/providers/startup/session_provider.dart
@@ -71,6 +71,8 @@ class SessionProvider extends StateProviderNotifier {
List faculties, {
required bool persistentSession,
}) async {
+ final locale =
+ Provider.of(context, listen: false).getLocale();
Session? session;
try {
session = await NetworkRouter.login(
@@ -80,9 +82,7 @@ class SessionProvider extends StateProviderNotifier {
persistentSession: persistentSession,
);
} catch (e) {
- throw InternetStatusException(
- Provider.of(context, listen: false).getLocale(),
- );
+ throw InternetStatusException(locale);
}
if (session == null) {
@@ -93,7 +93,7 @@ class SessionProvider extends StateProviderNotifier {
throw ExpiredCredentialsException();
} else {
throw WrongCredentialsException(
- Provider.of(context, listen: false).getLocale(),
+ locale,
);
}
}
diff --git a/uni/lib/utils/constants.dart b/uni/lib/utils/constants.dart
index 868683b34..b770e2bd5 100644
--- a/uni/lib/utils/constants.dart
+++ b/uni/lib/utils/constants.dart
@@ -12,5 +12,5 @@ const faculties = [
'fmup',
'fmdup',
'fpceup',
- 'icbas'
+ 'icbas',
];
diff --git a/uni/lib/view/about/about.dart b/uni/lib/view/about/about.dart
index 6badd3e3c..af9f90eb7 100644
--- a/uni/lib/view/about/about.dart
+++ b/uni/lib/view/about/about.dart
@@ -30,7 +30,7 @@ class AboutPageViewState extends GeneralPageViewState {
padding: EdgeInsets.all(queryData.size.width / 12),
child: const TermsAndConditions(),
),
- )
+ ),
],
);
}
diff --git a/uni/lib/view/bug_report/widgets/form.dart b/uni/lib/view/bug_report/widgets/form.dart
index 1b8321ad8..18ec82a16 100644
--- a/uni/lib/view/bug_report/widgets/form.dart
+++ b/uni/lib/view/bug_report/widgets/form.dart
@@ -199,9 +199,9 @@ class BugReportFormState extends State {
},
isExpanded: true,
),
- )
+ ),
],
- )
+ ),
],
),
);
diff --git a/uni/lib/view/bug_report/widgets/text_field.dart b/uni/lib/view/bug_report/widgets/text_field.dart
index 037b5e3db..d0413ca55 100644
--- a/uni/lib/view/bug_report/widgets/text_field.dart
+++ b/uni/lib/view/bug_report/widgets/text_field.dart
@@ -69,9 +69,9 @@ class FormTextField extends StatelessWidget {
return formatValidator?.call(value);
},
),
- )
+ ),
],
- )
+ ),
],
),
);
diff --git a/uni/lib/view/bus_stop_next_arrivals/bus_stop_next_arrivals.dart b/uni/lib/view/bus_stop_next_arrivals/bus_stop_next_arrivals.dart
index 807f85b9d..f48205b66 100644
--- a/uni/lib/view/bus_stop_next_arrivals/bus_stop_next_arrivals.dart
+++ b/uni/lib/view/bus_stop_next_arrivals/bus_stop_next_arrivals.dart
@@ -28,7 +28,7 @@ class BusStopNextArrivalsPageState
return LazyConsumer(
builder: (context, busProvider) => ListView(
children: [
- NextArrivals(busProvider.configuredBusStops, busProvider.status)
+ NextArrivals(busProvider.configuredBusStops, busProvider.status),
],
),
);
@@ -180,10 +180,10 @@ class NextArrivalsState extends State {
builder: (context) => const BusStopSelectionPage(),
),
),
- )
+ ),
],
),
- )
+ ),
];
}
@@ -212,7 +212,7 @@ class NextArrivalsState extends State {
children: getEachBusStopInfo(context),
),
),
- )
+ ),
];
}
@@ -250,7 +250,7 @@ class NextArrivalsState extends State {
trips: widget.buses[stopCode]?.trips ?? [],
stopCodeShow: false,
),
- )
+ ),
],
),
);
diff --git a/uni/lib/view/bus_stop_next_arrivals/widgets/trip_row.dart b/uni/lib/view/bus_stop_next_arrivals/widgets/trip_row.dart
index 3a05de40e..9f48c60cf 100644
--- a/uni/lib/view/bus_stop_next_arrivals/widgets/trip_row.dart
+++ b/uni/lib/view/bus_stop_next_arrivals/widgets/trip_row.dart
@@ -40,7 +40,7 @@ class TripRow extends StatelessWidget {
timeRemaining: trip.timeRemaining.toString(),
),
],
- )
+ ),
],
);
}
diff --git a/uni/lib/view/bus_stop_selection/bus_stop_selection.dart b/uni/lib/view/bus_stop_selection/bus_stop_selection.dart
index 651d038c6..ecdbfee06 100644
--- a/uni/lib/view/bus_stop_selection/bus_stop_selection.dart
+++ b/uni/lib/view/bus_stop_selection/bus_stop_selection.dart
@@ -76,7 +76,7 @@ class BusStopSelectionPageState
),
],
),
- )
+ ),
],
);
},
diff --git a/uni/lib/view/bus_stop_selection/widgets/bus_stop_search.dart b/uni/lib/view/bus_stop_selection/widgets/bus_stop_search.dart
index 5155dde2d..554c4d8d1 100644
--- a/uni/lib/view/bus_stop_selection/widgets/bus_stop_search.dart
+++ b/uni/lib/view/bus_stop_selection/widgets/bus_stop_search.dart
@@ -34,7 +34,7 @@ class BusStopSearch extends SearchDelegate {
onPressed: () {
query = '';
},
- )
+ ),
];
}
@@ -119,7 +119,7 @@ class BusStopSearch extends SearchDelegate {
Navigator.pop(context);
}
},
- )
+ ),
],
);
}
diff --git a/uni/lib/view/bus_stop_selection/widgets/bus_stop_selection_row.dart b/uni/lib/view/bus_stop_selection/widgets/bus_stop_selection_row.dart
index 66621e86c..b12175b0b 100644
--- a/uni/lib/view/bus_stop_selection/widgets/bus_stop_selection_row.dart
+++ b/uni/lib/view/bus_stop_selection/widgets/bus_stop_selection_row.dart
@@ -65,9 +65,9 @@ class BusStopSelectionRowState extends State {
onPressed: () {
deleteStop(context);
},
- )
+ ),
],
- )
+ ),
],
),
),
diff --git a/uni/lib/view/calendar/calendar.dart b/uni/lib/view/calendar/calendar.dart
index 5e5e79b68..1736da7d7 100644
--- a/uni/lib/view/calendar/calendar.dart
+++ b/uni/lib/view/calendar/calendar.dart
@@ -40,7 +40,7 @@ class CalendarPageViewState extends GeneralPageViewState {
style: TextStyle(fontSize: 18),
),
),
- )
+ ),
],
),
);
diff --git a/uni/lib/view/common_widgets/generic_card.dart b/uni/lib/view/common_widgets/generic_card.dart
index fb7ddde1e..9bd18de0c 100644
--- a/uni/lib/view/common_widgets/generic_card.dart
+++ b/uni/lib/view/common_widgets/generic_card.dart
@@ -99,7 +99,7 @@ class GenericCardState extends State {
color: Color.fromARGB(0x1c, 0, 0, 0),
blurRadius: 7,
offset: Offset(0, 1),
- )
+ ),
],
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
),
@@ -145,7 +145,7 @@ class GenericCardState extends State {
margin: const EdgeInsets.only(top: 8),
child: getMoveIcon(context),
),
- if (widget.editingMode) getDeleteIcon(context)
+ if (widget.editingMode) getDeleteIcon(context),
],
),
Container(
@@ -155,7 +155,7 @@ class GenericCardState extends State {
bottom: padding,
),
child: widget.buildCardContent(context),
- )
+ ),
],
),
),
diff --git a/uni/lib/view/common_widgets/generic_expansion_card.dart b/uni/lib/view/common_widgets/generic_expansion_card.dart
index e5faf99ca..68029a881 100644
--- a/uni/lib/view/common_widgets/generic_expansion_card.dart
+++ b/uni/lib/view/common_widgets/generic_expansion_card.dart
@@ -43,7 +43,7 @@ abstract class GenericExpansionCard extends StatelessWidget {
Container(
padding: const EdgeInsets.fromLTRB(12, 0, 12, 12),
child: buildCardContent(context),
- )
+ ),
],
),
);
diff --git a/uni/lib/view/common_widgets/last_update_timestamp.dart b/uni/lib/view/common_widgets/last_update_timestamp.dart
index f85358ddc..1e9e31e97 100644
--- a/uni/lib/view/common_widgets/last_update_timestamp.dart
+++ b/uni/lib/view/common_widgets/last_update_timestamp.dart
@@ -29,8 +29,8 @@ class _LastUpdateTimeStampState
{
setState(() {
currentTime = DateTime.now();
- })
- }
+ }),
+ },
},
);
}
@@ -59,7 +59,7 @@ class _LastUpdateTimeStampState
Text(
S.of(context).last_timestamp(elapsedTimeMinutes),
style: Theme.of(context).textTheme.titleSmall,
- )
+ ),
],
);
}
diff --git a/uni/lib/view/common_widgets/pages_layouts/general/general.dart b/uni/lib/view/common_widgets/pages_layouts/general/general.dart
index dd8ad236d..0314f2eb4 100644
--- a/uni/lib/view/common_widgets/pages_layouts/general/general.dart
+++ b/uni/lib/view/common_widgets/pages_layouts/general/general.dart
@@ -57,7 +57,7 @@ abstract class GeneralPageViewState extends State {
child: Center(
child: CircularProgressIndicator(),
),
- )
+ ),
],
)
: getBody(context),
@@ -179,7 +179,7 @@ abstract class GeneralPageViewState extends State {
MaterialPageRoute(
builder: (__) => const ProfilePageView(),
),
- )
+ ),
},
child: Container(
width: 40,
diff --git a/uni/lib/view/common_widgets/pages_layouts/general/widgets/navigation_drawer.dart b/uni/lib/view/common_widgets/pages_layouts/general/widgets/navigation_drawer.dart
index 5560d5611..18572148d 100644
--- a/uni/lib/view/common_widgets/pages_layouts/general/widgets/navigation_drawer.dart
+++ b/uni/lib/view/common_widgets/pages_layouts/general/widgets/navigation_drawer.dart
@@ -191,9 +191,9 @@ class AppNavigationDrawerState extends State {
alignment: Alignment.centerRight,
child: createLocaleBtn(),
),
- createThemeSwitchBtn()
+ createThemeSwitchBtn(),
],
- )
+ ),
],
),
);
diff --git a/uni/lib/view/common_widgets/request_dependent_widget_builder.dart b/uni/lib/view/common_widgets/request_dependent_widget_builder.dart
index 899de33a1..5efd0dfe6 100644
--- a/uni/lib/view/common_widgets/request_dependent_widget_builder.dart
+++ b/uni/lib/view/common_widgets/request_dependent_widget_builder.dart
@@ -98,7 +98,7 @@ class RequestDependentWidgetBuilder extends StatelessWidget {
'/${DrawerItem.navBugReport.title}',
),
child: Text(S.of(context).report_error),
- )
+ ),
],
);
},
diff --git a/uni/lib/view/common_widgets/toast_message.dart b/uni/lib/view/common_widgets/toast_message.dart
index aa1dc390d..f8d7d7ee1 100644
--- a/uni/lib/view/common_widgets/toast_message.dart
+++ b/uni/lib/view/common_widgets/toast_message.dart
@@ -53,7 +53,7 @@ class MessageToast extends StatelessWidget {
overflow: TextOverflow.ellipsis,
maxLines: 10,
),
- )
+ ),
],
),
),
diff --git a/uni/lib/view/course_unit_info/course_unit_info.dart b/uni/lib/view/course_unit_info/course_unit_info.dart
index dd858d9dd..aa38ec088 100644
--- a/uni/lib/view/course_unit_info/course_unit_info.dart
+++ b/uni/lib/view/course_unit_info/course_unit_info.dart
@@ -70,7 +70,7 @@ class CourseUnitDetailPageViewState
TabBar(
tabs: [
Tab(text: S.of(context).course_info),
- Tab(text: S.of(context).course_class)
+ Tab(text: S.of(context).course_class),
],
),
Expanded(
@@ -83,7 +83,7 @@ class CourseUnitDetailPageViewState
],
),
),
- )
+ ),
],
),
);
diff --git a/uni/lib/view/course_unit_info/widgets/course_unit_student_row.dart b/uni/lib/view/course_unit_info/widgets/course_unit_student_row.dart
index c0e7a6f95..f6f723d1b 100644
--- a/uni/lib/view/course_unit_info/widgets/course_unit_student_row.dart
+++ b/uni/lib/view/course_unit_info/widgets/course_unit_student_row.dart
@@ -54,11 +54,11 @@ class CourseUnitStudentRow extends StatelessWidget {
child: Text(
'up${student.number}',
),
- )
+ ),
],
),
),
- )
+ ),
],
),
);
diff --git a/uni/lib/view/course_units/course_units.dart b/uni/lib/view/course_units/course_units.dart
index 210930a9b..26c1b1715 100644
--- a/uni/lib/view/course_units/course_units.dart
+++ b/uni/lib/view/course_units/course_units.dart
@@ -95,7 +95,7 @@ class CourseUnitsPageViewState
style: Theme.of(context).textTheme.titleLarge,
),
),
- )
+ ),
],
);
}
@@ -146,7 +146,7 @@ class CourseUnitsPageViewState
}).toList(),
),
),
- const SizedBox(width: 20)
+ const SizedBox(width: 20),
],
);
}
@@ -197,7 +197,7 @@ class CourseUnitsPageViewState
children: [
Flexible(child: CourseUnitCard(courseUnits[i])),
const SizedBox(width: 10),
- const Spacer()
+ const Spacer(),
],
),
);
diff --git a/uni/lib/view/course_units/widgets/course_unit_card.dart b/uni/lib/view/course_units/widgets/course_unit_card.dart
index b269666ee..73ee045e8 100644
--- a/uni/lib/view/course_units/widgets/course_unit_card.dart
+++ b/uni/lib/view/course_units/widgets/course_unit_card.dart
@@ -22,7 +22,7 @@ class CourseUnitCard extends GenericCard {
children: [
Text("${courseUnit.ects.toString().replaceAll('.0', '')} ECTS"),
const Spacer(),
- Text(courseUnit.grade ?? '-')
+ Text(courseUnit.grade ?? '-'),
],
),
);
diff --git a/uni/lib/view/exams/widgets/exam_row.dart b/uni/lib/view/exams/widgets/exam_row.dart
index 4106228f3..83457ad84 100644
--- a/uni/lib/view/exams/widgets/exam_row.dart
+++ b/uni/lib/view/exams/widgets/exam_row.dart
@@ -48,7 +48,7 @@ class _ExamRowState extends State {
children: [
ExamTime(
begin: widget.exam.beginTime,
- )
+ ),
],
),
ExamTitle(
@@ -91,7 +91,7 @@ class _ExamRowState extends State {
key: Key(roomsKey),
alignment: Alignment.topLeft,
child: getExamRooms(context),
- )
+ ),
],
),
),
diff --git a/uni/lib/view/home/widgets/bus_stop_card.dart b/uni/lib/view/home/widgets/bus_stop_card.dart
index 8607947e4..2345458cc 100644
--- a/uni/lib/view/home/widgets/bus_stop_card.dart
+++ b/uni/lib/view/home/widgets/bus_stop_card.dart
@@ -58,7 +58,7 @@ Widget getCardContent(
return Column(
children: [
getCardTitle(context),
- getBusStopsInfo(context, stopData)
+ getBusStopsInfo(context, stopData),
],
);
} else {
@@ -81,7 +81,7 @@ Widget getCardContent(
builder: (context) => const BusStopSelectionPage(),
),
),
- )
+ ),
],
),
);
@@ -93,7 +93,7 @@ Widget getCardContent(
Container(
padding: const EdgeInsets.all(22),
child: const Center(child: CircularProgressIndicator()),
- )
+ ),
],
);
case RequestStatus.failed:
@@ -107,7 +107,7 @@ Widget getCardContent(
S.of(context).bus_error,
style: Theme.of(context).textTheme.titleMedium,
),
- )
+ ),
],
);
}
diff --git a/uni/lib/view/home/widgets/exam_card.dart b/uni/lib/view/home/widgets/exam_card.dart
index 2c24105f8..0b3199cc4 100644
--- a/uni/lib/view/home/widgets/exam_card.dart
+++ b/uni/lib/view/home/widgets/exam_card.dart
@@ -114,12 +114,12 @@ class ExamCard extends GenericCard {
DateRectangle(
date: '''${exam.weekDay(locale)}, '''
'''${exam.begin.day} de ${exam.month(locale)}''',
- )
+ ),
] else ...[
DateRectangle(
date: '''${exam.weekDay(locale)}, '''
'''${exam.begin.day} ${exam.month(locale)}''',
- )
+ ),
],
RowContainer(
child: ExamRow(
@@ -127,7 +127,7 @@ class ExamCard extends GenericCard {
teacher: '',
mainPage: true,
),
- )
+ ),
],
);
}
@@ -153,7 +153,7 @@ class ExamCard extends GenericCard {
subject: exam.subject,
type: exam.type,
reverseOrder: true,
- )
+ ),
],
),
),
diff --git a/uni/lib/view/home/widgets/exam_card_shimmer.dart b/uni/lib/view/home/widgets/exam_card_shimmer.dart
index 083d1ea5c..86ca3edc8 100644
--- a/uni/lib/view/home/widgets/exam_card_shimmer.dart
+++ b/uni/lib/view/home/widgets/exam_card_shimmer.dart
@@ -37,7 +37,7 @@ class ExamCardShimmer extends StatelessWidget {
color: Colors.black,
),
],
- )
+ ),
],
),
Container(
@@ -89,7 +89,7 @@ class ExamCardShimmer extends StatelessWidget {
color: Colors.black,
),
],
- )
+ ),
],
),
),
diff --git a/uni/lib/view/home/widgets/exit_app_dialog.dart b/uni/lib/view/home/widgets/exit_app_dialog.dart
index 0abd03550..02ac6f88c 100644
--- a/uni/lib/view/home/widgets/exit_app_dialog.dart
+++ b/uni/lib/view/home/widgets/exit_app_dialog.dart
@@ -38,7 +38,7 @@ class BackButtonExitWrapper extends StatelessWidget {
Navigator.of(context).pop(false);
},
child: Text(S.of(context).yes),
- )
+ ),
],
),
);
diff --git a/uni/lib/view/home/widgets/main_cards_list.dart b/uni/lib/view/home/widgets/main_cards_list.dart
index f28665a1c..241f6a2f1 100644
--- a/uni/lib/view/home/widgets/main_cards_list.dart
+++ b/uni/lib/view/home/widgets/main_cards_list.dart
@@ -69,7 +69,7 @@ class MainCardsList extends StatelessWidget {
homePageProvider.favoriteCards,
context,
homePageProvider,
- )
+ ),
],
),
),
@@ -102,7 +102,7 @@ class MainCardsList extends StatelessWidget {
style: Theme.of(context).textTheme.bodyMedium,
),
onPressed: () => Navigator.pop(context),
- )
+ ),
],
);
},
@@ -170,7 +170,7 @@ class MainCardsList extends StatelessWidget {
: S.of(context).edit_off,
style: Theme.of(context).textTheme.bodySmall,
),
- )
+ ),
],
),
);
diff --git a/uni/lib/view/home/widgets/restaurant_card.dart b/uni/lib/view/home/widgets/restaurant_card.dart
index ea23dc5be..010264d9b 100644
--- a/uni/lib/view/home/widgets/restaurant_card.dart
+++ b/uni/lib/view/home/widgets/restaurant_card.dart
@@ -66,7 +66,7 @@ class RestaurantCard extends GenericCard {
'/${DrawerItem.navRestaurants.title}',
),
child: Text(S.of(context).add),
- )
+ ),
],
),
);
@@ -90,7 +90,7 @@ class RestaurantCard extends GenericCard {
context,
restaurants[index],
DayOfWeek.values[offset],
- )
+ ),
],
);
},
@@ -142,7 +142,7 @@ class RestaurantCard extends GenericCard {
child: Text(S.of(context).no_menu_info),
),
),
- )
+ ),
],
);
}
diff --git a/uni/lib/view/home/widgets/restaurant_row.dart b/uni/lib/view/home/widgets/restaurant_row.dart
index 7a62039e1..df670e0ae 100644
--- a/uni/lib/view/home/widgets/restaurant_row.dart
+++ b/uni/lib/view/home/widgets/restaurant_row.dart
@@ -30,7 +30,7 @@ class RestaurantRow extends StatelessWidget {
child: Column(
children: getMenuRows(context),
),
- )
+ ),
],
),
);
@@ -43,7 +43,7 @@ class RestaurantRow extends StatelessWidget {
meatMenu: MdiIcons.foodDrumstickOutline,
fishMenu: MdiIcons.fish,
vegetarianMenu: MdiIcons.corn,
- dietMenu: MdiIcons.nutrition
+ dietMenu: MdiIcons.nutrition,
};
for (final element in meals) {
diff --git a/uni/lib/view/home/widgets/schedule_card_shimmer.dart b/uni/lib/view/home/widgets/schedule_card_shimmer.dart
index 4c572d050..32fdbb93d 100644
--- a/uni/lib/view/home/widgets/schedule_card_shimmer.dart
+++ b/uni/lib/view/home/widgets/schedule_card_shimmer.dart
@@ -34,7 +34,7 @@ class ScheduleCardShimmer extends StatelessWidget {
color: Colors.black,
),
],
- )
+ ),
],
),
Column(
diff --git a/uni/lib/view/library/library.dart b/uni/lib/view/library/library.dart
index d34c9de99..c5e48db7e 100644
--- a/uni/lib/view/library/library.dart
+++ b/uni/lib/view/library/library.dart
@@ -94,7 +94,7 @@ class LibraryPage extends StatelessWidget {
color: Color.fromARGB(0x1c, 0, 0, 0),
blurRadius: 7,
offset: Offset(0, 1),
- )
+ ),
],
),
child: Column(
@@ -120,7 +120,7 @@ class LibraryPage extends StatelessWidget {
percent: floor.percentage / 100,
progressColor: Theme.of(context).colorScheme.secondary,
backgroundColor: Theme.of(context).dividerColor,
- )
+ ),
],
),
);
diff --git a/uni/lib/view/locations/locations.dart b/uni/lib/view/locations/locations.dart
index f722cc7dd..be9e1d15d 100644
--- a/uni/lib/view/locations/locations.dart
+++ b/uni/lib/view/locations/locations.dart
@@ -75,7 +75,7 @@ class LocationsPageView extends StatelessWidget {
onNullContent: Center(child: Text(S.of(context).no_places_info)),
),
// TODO(bdmendes): add support for multiple faculties
- )
+ ),
],
);
}
diff --git a/uni/lib/view/locations/widgets/floorless_marker_popup.dart b/uni/lib/view/locations/widgets/floorless_marker_popup.dart
index 9c5548033..60b7b5574 100644
--- a/uni/lib/view/locations/widgets/floorless_marker_popup.dart
+++ b/uni/lib/view/locations/widgets/floorless_marker_popup.dart
@@ -47,7 +47,7 @@ class FloorlessLocationMarkerPopup extends StatelessWidget {
location.description(),
textAlign: TextAlign.left,
style: TextStyle(color: FacultyMap.getFontColor(context)),
- )
+ ),
],
),
)
@@ -68,7 +68,7 @@ class LocationRow extends StatelessWidget {
location.description(),
textAlign: TextAlign.left,
style: TextStyle(color: FacultyMap.getFontColor(context)),
- )
+ ),
],
);
}
diff --git a/uni/lib/view/locations/widgets/map.dart b/uni/lib/view/locations/widgets/map.dart
index 1cb1b3365..c03b8b42c 100644
--- a/uni/lib/view/locations/widgets/map.dart
+++ b/uni/lib/view/locations/widgets/map.dart
@@ -55,7 +55,7 @@ class LocationsMap extends StatelessWidget {
),
),
),
- )
+ ),
],
children: [
TileLayer(
diff --git a/uni/lib/view/locations/widgets/marker_popup.dart b/uni/lib/view/locations/widgets/marker_popup.dart
index 068bae2d6..91a7251f6 100644
--- a/uni/lib/view/locations/widgets/marker_popup.dart
+++ b/uni/lib/view/locations/widgets/marker_popup.dart
@@ -68,7 +68,7 @@ class Floor extends StatelessWidget {
'${S.of(context).floor} $floorString',
style: TextStyle(color: fontColor),
),
- )
+ ),
],
);
final Widget locationsColumn = Container(
@@ -104,7 +104,7 @@ class LocationRow extends StatelessWidget {
location.description(),
textAlign: TextAlign.left,
style: TextStyle(color: color),
- )
+ ),
],
);
}
diff --git a/uni/lib/view/login/login.dart b/uni/lib/view/login/login.dart
index 476fa5af8..17d1076b7 100644
--- a/uni/lib/view/login/login.dart
+++ b/uni/lib/view/login/login.dart
@@ -26,7 +26,7 @@ class LoginPageView extends StatefulWidget {
/// Manages the 'login section' view.
class LoginPageViewState extends State {
List faculties = [
- 'feup'
+ 'feup',
]; // May choose more than one faculty in the dropdown.
static final FocusNode usernameFocus = FocusNode();
@@ -45,6 +45,7 @@ class LoginPageViewState extends State {
Future _login(BuildContext context) async {
final stateProviders = StateProviders.fromContext(context);
final sessionProvider = stateProviders.sessionProvider;
+
if (!_loggingIn && _formKey.currentState!.validate()) {
final user = usernameController.text.trim();
final pass = passwordController.text.trim();
@@ -76,13 +77,19 @@ class LoginPageViewState extends State {
if (error is ExpiredCredentialsException) {
updatePasswordDialog();
} else if (error is InternetStatusException) {
- unawaited(ToastMessage.warning(context, error.message));
+ if (context.mounted) {
+ unawaited(ToastMessage.warning(context, error.message));
+ }
} else if (error is WrongCredentialsException) {
- unawaited(ToastMessage.error(context, error.message));
+ if (context.mounted) {
+ unawaited(ToastMessage.error(context, error.message));
+ }
} else {
Logger().e(error, stackTrace: stackTrace);
unawaited(Sentry.captureException(error, stackTrace: stackTrace));
- unawaited(ToastMessage.error(context, S.of(context).failed_login));
+ if (context.mounted) {
+ unawaited(ToastMessage.error(context, S.of(context).failed_login));
+ }
}
}
}
diff --git a/uni/lib/view/login/widgets/faculties_selection_form.dart b/uni/lib/view/login/widgets/faculties_selection_form.dart
index 88db0b18b..58602cca7 100644
--- a/uni/lib/view/login/widgets/faculties_selection_form.dart
+++ b/uni/lib/view/login/widgets/faculties_selection_form.dart
@@ -61,7 +61,7 @@ class _FacultiesSelectionFormState extends State {
widget.setFaculties(widget.selectedFaculties);
},
child: Text(S.of(context).confirm),
- )
+ ),
];
}
diff --git a/uni/lib/view/login/widgets/inputs.dart b/uni/lib/view/login/widgets/inputs.dart
index ddbde1f26..b926e1831 100644
--- a/uni/lib/view/login/widgets/inputs.dart
+++ b/uni/lib/view/login/widgets/inputs.dart
@@ -206,7 +206,7 @@ Future _showLoginDetails(BuildContext context) async {
SimpleDialogOption(
onPressed: () => Navigator.pop(context),
child: const Text('OK'),
- )
+ ),
],
);
},
diff --git a/uni/lib/view/profile/profile.dart b/uni/lib/view/profile/profile.dart
index 8545ab231..6e23db12a 100644
--- a/uni/lib/view/profile/profile.dart
+++ b/uni/lib/view/profile/profile.dart
@@ -26,7 +26,7 @@ class ProfilePageViewState extends SecondaryPageViewState {
.map(
(e) => [
CourseInfoCard(course: e),
- const Padding(padding: EdgeInsets.all(5))
+ const Padding(padding: EdgeInsets.all(5)),
],
)
.flattened
diff --git a/uni/lib/view/profile/widgets/account_info_card.dart b/uni/lib/view/profile/widgets/account_info_card.dart
index a93394460..9e5162fa3 100644
--- a/uni/lib/view/profile/widgets/account_info_card.dart
+++ b/uni/lib/view/profile/widgets/account_info_card.dart
@@ -63,7 +63,7 @@ class AccountInfoCard extends GenericCard {
right: 30,
),
child: getInfoText(profile.feesBalance, context),
- )
+ ),
],
),
TableRow(
@@ -92,7 +92,7 @@ class AccountInfoCard extends GenericCard {
: S.of(context).no_date,
context,
),
- )
+ ),
],
),
TableRow(
@@ -115,9 +115,9 @@ class AccountInfoCard extends GenericCard {
left: 20,
),
child: const TuitionNotificationSwitch(),
- )
+ ),
],
- )
+ ),
],
),
Container(
@@ -138,7 +138,7 @@ class AccountInfoCard extends GenericCard {
showLastRefreshedTime(
profileStateProvider.lastUpdateTime?.toIso8601String(),
context,
- )
+ ),
],
);
},
diff --git a/uni/lib/view/profile/widgets/course_info_card.dart b/uni/lib/view/profile/widgets/course_info_card.dart
index eb920ea65..9da69eae2 100644
--- a/uni/lib/view/profile/widgets/course_info_card.dart
+++ b/uni/lib/view/profile/widgets/course_info_card.dart
@@ -30,7 +30,7 @@ class CourseInfoCard extends GenericCard {
course.currYear ?? S.of(context).unavailable,
context,
),
- )
+ ),
],
),
TableRow(
@@ -48,7 +48,7 @@ class CourseInfoCard extends GenericCard {
course.state ?? S.of(context).unavailable,
context,
),
- )
+ ),
],
),
TableRow(
@@ -68,7 +68,7 @@ class CourseInfoCard extends GenericCard {
: '?',
context,
),
- )
+ ),
],
),
TableRow(
@@ -86,7 +86,7 @@ class CourseInfoCard extends GenericCard {
course.faculty?.toUpperCase() ?? S.of(context).unavailable,
context,
),
- )
+ ),
],
),
TableRow(
@@ -104,7 +104,7 @@ class CourseInfoCard extends GenericCard {
course.currentAverage?.toString() ?? S.of(context).unavailable,
context,
),
- )
+ ),
],
),
TableRow(
@@ -122,9 +122,9 @@ class CourseInfoCard extends GenericCard {
course.finishedEcts?.toString().replaceFirst('.0', '') ?? '?',
context,
),
- )
+ ),
],
- )
+ ),
],
);
}
diff --git a/uni/lib/view/profile/widgets/create_print_mb_dialog.dart b/uni/lib/view/profile/widgets/create_print_mb_dialog.dart
index 51ddddd4a..1e6eee537 100644
--- a/uni/lib/view/profile/widgets/create_print_mb_dialog.dart
+++ b/uni/lib/view/profile/widgets/create_print_mb_dialog.dart
@@ -90,9 +90,9 @@ Future addMoneyDialog(BuildContext context) async {
),
);
},
- )
+ ),
],
- )
+ ),
],
),
),
@@ -111,7 +111,7 @@ Future addMoneyDialog(BuildContext context) async {
ElevatedButton(
onPressed: () => generateReference(context, value),
child: Text(S.of(context).generate_reference),
- )
+ ),
],
);
},
@@ -142,7 +142,7 @@ Future generateReference(BuildContext context, double amount) async {
if (response.statusCode == 200 && context.mounted) {
Navigator.of(context).pop(false);
await ToastMessage.success(context, S.of(context).reference_success);
- } else {
+ } else if (context.mounted) {
await ToastMessage.error(context, S.of(context).some_error);
}
}
diff --git a/uni/lib/view/profile/widgets/print_info_card.dart b/uni/lib/view/profile/widgets/print_info_card.dart
index fa26a3ebb..cebb17675 100644
--- a/uni/lib/view/profile/widgets/print_info_card.dart
+++ b/uni/lib/view/profile/widgets/print_info_card.dart
@@ -26,7 +26,7 @@ class PrintInfoCard extends GenericCard {
Table(
columnWidths: const {
1: FractionColumnWidth(0.4),
- 2: FractionColumnWidth(.1)
+ 2: FractionColumnWidth(.1),
},
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
children: [
@@ -63,13 +63,13 @@ class PrintInfoCard extends GenericCard {
),
),
],
- )
+ ),
],
),
showLastRefreshedTime(
profileStateProvider.lastUpdateTime?.toIso8601String(),
context,
- )
+ ),
],
);
},
diff --git a/uni/lib/view/restaurant/widgets/restaurant_slot.dart b/uni/lib/view/restaurant/widgets/restaurant_slot.dart
index d1f57cef4..f819ac36b 100644
--- a/uni/lib/view/restaurant/widgets/restaurant_slot.dart
+++ b/uni/lib/view/restaurant/widgets/restaurant_slot.dart
@@ -31,7 +31,7 @@ class RestaurantSlot extends StatelessWidget {
style: Theme.of(context).textTheme.bodyMedium,
textAlign: TextAlign.left,
),
- )
+ ),
],
),
),
diff --git a/uni/lib/view/schedule/schedule.dart b/uni/lib/view/schedule/schedule.dart
index 0651fe625..8ebe3664f 100644
--- a/uni/lib/view/schedule/schedule.dart
+++ b/uni/lib/view/schedule/schedule.dart
@@ -116,7 +116,7 @@ class SchedulePageViewState extends GeneralPageViewState
widget.scheduleStatus,
),
),
- )
+ ),
],
);
}
diff --git a/uni/lib/view/schedule/widgets/schedule_slot.dart b/uni/lib/view/schedule/widgets/schedule_slot.dart
index d63957f02..89f935bb2 100644
--- a/uni/lib/view/schedule/widgets/schedule_slot.dart
+++ b/uni/lib/view/schedule/widgets/schedule_slot.dart
@@ -98,7 +98,7 @@ class ScheduleSlot extends StatelessWidget {
],
),
),
- roomTextField
+ roomTextField,
];
}
}
diff --git a/uni/lib/view/terms_and_condition_dialog.dart b/uni/lib/view/terms_and_condition_dialog.dart
index 245cd0747..5f4027ea0 100644
--- a/uni/lib/view/terms_and_condition_dialog.dart
+++ b/uni/lib/view/terms_and_condition_dialog.dart
@@ -80,7 +80,7 @@ class TermsAndConditionDialog {
),
),
],
- )
+ ),
],
),
);
diff --git a/uni/lib/view/useful_info/useful_info.dart b/uni/lib/view/useful_info/useful_info.dart
index 0fae6b457..890b54cb8 100644
--- a/uni/lib/view/useful_info/useful_info.dart
+++ b/uni/lib/view/useful_info/useful_info.dart
@@ -31,7 +31,7 @@ class UsefulInfoPageViewState extends GeneralPageViewState {
const CopyCenterCard(),
const MultimediaCenterCard(),
const SigarraLinksCard(),
- const OtherLinksCard()
+ const OtherLinksCard(),
],
);
}
diff --git a/uni/lib/view/useful_info/widgets/copy_center_card.dart b/uni/lib/view/useful_info/widgets/copy_center_card.dart
index 63804215b..055610a55 100644
--- a/uni/lib/view/useful_info/widgets/copy_center_card.dart
+++ b/uni/lib/view/useful_info/widgets/copy_center_card.dart
@@ -29,7 +29,7 @@ class CopyCenterCard extends GenericExpansionCard {
context,
link: 'mailto:editorial@aefeup.pt',
last: true,
- )
+ ),
],
);
}
diff --git a/uni/lib/view/useful_info/widgets/dona_bia_card.dart b/uni/lib/view/useful_info/widgets/dona_bia_card.dart
index bb4c9561b..e08b30307 100644
--- a/uni/lib/view/useful_info/widgets/dona_bia_card.dart
+++ b/uni/lib/view/useful_info/widgets/dona_bia_card.dart
@@ -26,7 +26,7 @@ class DonaBiaCard extends GenericExpansionCard {
context,
last: true,
link: 'mailto:papelaria.fe.up@gmail.com',
- )
+ ),
],
);
}
diff --git a/uni/lib/view/useful_info/widgets/infodesk_card.dart b/uni/lib/view/useful_info/widgets/infodesk_card.dart
index b921c0309..ddbed1d13 100644
--- a/uni/lib/view/useful_info/widgets/infodesk_card.dart
+++ b/uni/lib/view/useful_info/widgets/infodesk_card.dart
@@ -26,7 +26,7 @@ class InfoDeskCard extends GenericExpansionCard {
context,
last: true,
link: 'mailto:infodesk@fe.up.pt',
- )
+ ),
],
);
}
diff --git a/uni/lib/view/useful_info/widgets/link_button.dart b/uni/lib/view/useful_info/widgets/link_button.dart
index 3dc240d3c..4fc901bfb 100644
--- a/uni/lib/view/useful_info/widgets/link_button.dart
+++ b/uni/lib/view/useful_info/widgets/link_button.dart
@@ -29,7 +29,7 @@ class LinkButton extends StatelessWidget {
),
onTap: () => launchUrl(Uri.parse(link)),
),
- )
+ ),
],
),
],
diff --git a/uni/lib/view/useful_info/widgets/multimedia_center_card.dart b/uni/lib/view/useful_info/widgets/multimedia_center_card.dart
index fef087645..46bda1568 100644
--- a/uni/lib/view/useful_info/widgets/multimedia_center_card.dart
+++ b/uni/lib/view/useful_info/widgets/multimedia_center_card.dart
@@ -26,7 +26,7 @@ class MultimediaCenterCard extends GenericExpansionCard {
context,
last: true,
link: 'mailto:imprimir@fe.up.pt',
- )
+ ),
],
);
}
diff --git a/uni/lib/view/useful_info/widgets/sigarra_links_card.dart b/uni/lib/view/useful_info/widgets/sigarra_links_card.dart
index caec46c16..91ed49da0 100644
--- a/uni/lib/view/useful_info/widgets/sigarra_links_card.dart
+++ b/uni/lib/view/useful_info/widgets/sigarra_links_card.dart
@@ -34,11 +34,6 @@ class SigarraLinksCard extends GenericExpansionCard {
link:
'https://sigarra.up.pt/feup/pt/inqueritos_geral.inqueritos_list',
),
- LinkButton(
- title: S.of(context).school_calendar,
- link:
- 'https://sigarra.up.pt/feup/pt/web_base.gera_pagina?p_pagina=p%c3%a1gina%20est%c3%a1tica%20gen%c3%a9rica%20106',
- )
],
);
}
diff --git a/uni/pubspec.lock b/uni/pubspec.lock
index 1e6bafcfc..1ac709fa0 100644
--- a/uni/pubspec.lock
+++ b/uni/pubspec.lock
@@ -13,10 +13,10 @@ packages:
dependency: "direct main"
description:
name: add_2_calendar
- sha256: "7153285bb68321a0e0733d4cbc86336a808ac25efcddce74f5194eda6c5a4906"
+ sha256: dbcd0bf296fbbe00861a6f101af8cdb3c163a8c3ff5d3c99a4b081c2f37c724f
url: "https://pub.dev"
source: hosted
- version: "2.2.4"
+ version: "2.2.5"
analyzer:
dependency: transitive
description:
@@ -205,18 +205,18 @@ packages:
dependency: "direct main"
description:
name: collection
- sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+ sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
- version: "1.17.1"
+ version: "1.17.2"
connectivity_plus:
dependency: "direct main"
description:
name: connectivity_plus
- sha256: "77a180d6938f78ca7d2382d2240eb626c0f6a735d0bfdce227d8ffb80f95c48b"
+ sha256: "94d51c6f1299133a2baa4c5c3d2c11ec7d7fb4768dee5c52a56f7d7522fcf70e"
url: "https://pub.dev"
source: hosted
- version: "4.0.2"
+ version: "5.0.0"
connectivity_plus_platform_interface:
dependency: transitive
description:
@@ -521,10 +521,10 @@ packages:
dependency: "direct main"
description:
name: intl
- sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
+ sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.dev"
source: hosted
- version: "0.18.0"
+ version: "0.18.1"
io:
dependency: transitive
description:
@@ -593,18 +593,18 @@ packages:
dependency: transitive
description:
name: matcher
- sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
- version: "0.12.15"
+ version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
- version: "0.2.0"
+ version: "0.5.0"
material_design_icons_flutter:
dependency: "direct main"
description:
@@ -1007,10 +1007,10 @@ packages:
dependency: transitive
description:
name: source_span
- sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
- version: "1.9.1"
+ version: "1.10.0"
sqflite:
dependency: "direct main"
description:
@@ -1079,26 +1079,26 @@ packages:
dependency: "direct dev"
description:
name: test
- sha256: "3dac9aecf2c3991d09b9cdde4f98ded7b30804a88a0d7e4e7e1678e78d6b97f4"
+ sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46"
url: "https://pub.dev"
source: hosted
- version: "1.24.1"
+ version: "1.24.3"
test_api:
dependency: transitive
description:
name: test_api
- sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+ sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
source: hosted
- version: "0.5.1"
+ version: "0.6.0"
test_core:
dependency: transitive
description:
name: test_core
- sha256: "5138dbffb77b2289ecb12b81c11ba46036590b72a64a7a90d6ffb880f1a29e93"
+ sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e"
url: "https://pub.dev"
source: hosted
- version: "0.5.1"
+ version: "0.5.3"
timelines:
dependency: "direct main"
description:
@@ -1275,6 +1275,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
+ web:
+ dependency: transitive
+ description:
+ name: web
+ sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.4-beta"
web_socket_channel:
dependency: transitive
description:
@@ -1311,10 +1319,10 @@ packages:
dependency: "direct main"
description:
name: workmanager
- sha256: e0be7e35d644643f164ee45d2ce14414f0e0fdde19456aa66065f35a0b1d2ea1
+ sha256: ed13530cccd28c5c9959ad42d657cd0666274ca74c56dea0ca183ddd527d3a00
url: "https://pub.dev"
source: hosted
- version: "0.5.1"
+ version: "0.5.2"
xdg_directories:
dependency: transitive
description:
@@ -1340,5 +1348,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
- dart: ">=3.0.0 <4.0.0"
- flutter: ">=3.10.6"
+ dart: ">=3.1.2 <4.0.0"
+ flutter: ">=3.13.7"
diff --git a/uni/pubspec.yaml b/uni/pubspec.yaml
index 3206b1e6f..6db358086 100644
--- a/uni/pubspec.yaml
+++ b/uni/pubspec.yaml
@@ -1,23 +1,23 @@
name: uni
description: A UP no teu bolso.
-publish_to: 'none' # We do not publish to pub.dev
+publish_to: "none" # We do not publish to pub.dev
# The app version name is automatically bumped by CI.
# To change it manually, override the value in app_version.txt.
# The app version code is automatically also bumped by CI.
# Do not change it manually.
-version: 1.7.13+203
+version: 1.7.19+209
environment:
- sdk: '>=3.0.0 <4.0.0'
- flutter: 3.10.6
+ sdk: ">=3.0.0 <4.0.0"
+ flutter: 3.13.7
dependencies:
- add_2_calendar: ^2.2.4
+ add_2_calendar: ^2.2.5
cached_network_image: ^3.2.3
collection: ^1.16.0
- connectivity_plus: ^4.0.1
+ connectivity_plus: ^5.0.0
crypto: ^3.0.1
cupertino_icons: ^1.0.2
currency_text_input_formatter: ^2.1.5
@@ -54,7 +54,7 @@ dependencies:
timelines: ^0.1.0
tuple: ^2.0.0
url_launcher: ^6.0.2
- workmanager: ^0.5.1
+ workmanager: ^0.5.2
dev_dependencies:
build_runner: ^2.4.6
diff --git a/uni/test/integration/src/schedule_page_test.dart b/uni/test/integration/src/schedule_page_test.dart
index 2f040fc0b..bfa07b2a2 100644
--- a/uni/test/integration/src/schedule_page_test.dart
+++ b/uni/test/integration/src/schedule_page_test.dart
@@ -29,7 +29,7 @@ class UriMatcher extends CustomMatcher {
@GenerateNiceMocks([
MockSpec(),
MockSpec(),
- MockSpec()
+ MockSpec(),
])
void main() {
group('SchedulePage Integration Tests', () {
diff --git a/uni/test/test_widget.dart b/uni/test/test_widget.dart
index b710b524a..07dcd7d47 100644
--- a/uni/test/test_widget.dart
+++ b/uni/test/test_widget.dart
@@ -14,7 +14,7 @@ Widget testableWidget(
ChangeNotifierProvider(
create: (_) => LocaleNotifier(AppLocale.pt),
),
- ...providers
+ ...providers,
],
child: wrapWidget(widget),
);
diff --git a/uni/test/unit/view/Pages/schedule_page_view_test.dart b/uni/test/unit/view/Pages/schedule_page_view_test.dart
index f6869893d..59c77e725 100644
--- a/uni/test/unit/view/Pages/schedule_page_view_test.dart
+++ b/uni/test/unit/view/Pages/schedule_page_view_test.dart
@@ -89,7 +89,7 @@ void main() {
'Terça-feira',
'Quarta-feira',
'Quinta-feira',
- 'Sexta-feira'
+ 'Sexta-feira',
];
testWidgets('When given one lecture on a single day',
@@ -147,7 +147,7 @@ void main() {
lecture3,
lecture4,
lecture5,
- lecture6
+ lecture6,
],
scheduleStatus: RequestStatus.successful,
),
diff --git a/uni/test/unit/view/Widgets/exam_row_test.dart b/uni/test/unit/view/Widgets/exam_row_test.dart
index 02b547631..dcdce9505 100644
--- a/uni/test/unit/view/Widgets/exam_row_test.dart
+++ b/uni/test/unit/view/Widgets/exam_row_test.dart
@@ -32,7 +32,7 @@ void main() {
final widget = ExamRow(exam: exam, teacher: '', mainPage: true);
final providers = [
- ChangeNotifierProvider(create: (_) => ExamProvider())
+ ChangeNotifierProvider(create: (_) => ExamProvider()),
];
await tester.pumpWidget(testableWidget(widget, providers: providers));
await tester.pump();
@@ -54,7 +54,7 @@ void main() {
final widget = ExamRow(exam: exam, teacher: '', mainPage: true);
final providers = [
- ChangeNotifierProvider(create: (_) => ExamProvider())
+ ChangeNotifierProvider(create: (_) => ExamProvider()),
];
await tester.pumpWidget(testableWidget(widget, providers: providers));