Skip to content

Commit

Permalink
Fix multiple Bugs (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkoerber authored Feb 11, 2024
1 parent 49678a9 commit 8e7de8a
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 168 deletions.
75 changes: 35 additions & 40 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
PODS:
- device_info_plus (0.0.1):
- Flutter
- Firebase/CoreOnly (10.18.0):
- FirebaseCore (= 10.18.0)
- Firebase/Crashlytics (10.18.0):
- Firebase/CoreOnly (10.20.0):
- FirebaseCore (= 10.20.0)
- Firebase/Crashlytics (10.20.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.18.0)
- firebase_core (2.24.2):
- Firebase/CoreOnly (= 10.18.0)
- FirebaseCrashlytics (~> 10.20.0)
- firebase_core (2.25.4):
- Firebase/CoreOnly (= 10.20.0)
- Flutter
- firebase_crashlytics (3.4.9):
- Firebase/Crashlytics (= 10.18.0)
- firebase_crashlytics (3.4.14):
- Firebase/Crashlytics (= 10.20.0)
- firebase_core
- Flutter
- FirebaseCore (10.18.0):
- FirebaseCore (10.20.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.12)
- GoogleUtilities/Logger (~> 7.12)
- FirebaseCoreExtension (10.19.0):
- FirebaseCoreExtension (10.21.0):
- FirebaseCore (~> 10.0)
- FirebaseCoreInternal (10.19.0):
- FirebaseCoreInternal (10.21.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseCrashlytics (10.18.0):
- FirebaseCrashlytics (10.20.0):
- FirebaseCore (~> 10.5)
- FirebaseInstallations (~> 10.0)
- FirebaseSessions (~> 10.5)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/Environment (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (~> 2.1)
- FirebaseInstallations (10.19.0):
- FirebaseInstallations (10.21.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseSessions (10.19.0):
- FirebaseSessions (10.21.0):
- FirebaseCore (~> 10.5)
- FirebaseCoreExtension (~> 10.0)
- FirebaseInstallations (~> 10.0)
Expand All @@ -47,9 +47,6 @@ PODS:
- Flutter
- flutter_secure_storage (6.0.0):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- geolocator_apple (1.2.0):
- Flutter
- google_maps_flutter_ios (0.0.1):
Expand All @@ -59,10 +56,10 @@ PODS:
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleMaps (8.3.1):
- GoogleMaps/Maps (= 8.3.1)
- GoogleMaps/Base (8.3.1)
- GoogleMaps/Maps (8.3.1):
- GoogleMaps (8.4.0):
- GoogleMaps/Maps (= 8.4.0)
- GoogleMaps/Base (8.4.0)
- GoogleMaps/Maps (8.4.0):
- GoogleMaps/Base
- GoogleUtilities/Environment (7.12.0):
- PromisesObjC (< 3.0, >= 1.2)
Expand All @@ -83,7 +80,7 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.1):
- permission_handler_apple (9.3.0):
- Flutter
- PromisesObjC (2.3.1)
- PromisesSwift (2.3.1):
Expand All @@ -93,7 +90,7 @@ PODS:
- FlutterMacOS
- sqflite (0.0.3):
- Flutter
- FMDB (>= 2.7.5)
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter
- video_player_avfoundation (0.0.1):
Expand All @@ -114,7 +111,7 @@ DEPENDENCIES:
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)

Expand All @@ -127,7 +124,6 @@ SPEC REPOS:
- FirebaseCrashlytics
- FirebaseInstallations
- FirebaseSessions
- FMDB
- GoogleDataTransport
- GoogleMaps
- GoogleUtilities
Expand Down Expand Up @@ -163,44 +159,43 @@ EXTERNAL SOURCES:
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
:path: ".symlinks/plugins/sqflite/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/darwin"

SPEC CHECKSUMS:
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
firebase_core: 0af4a2b24f62071f9bf283691c0ee41556dcb3f5
firebase_crashlytics: 4b91b8ad60ee7c168fe88979f84c9573a729de7a
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
FirebaseCoreExtension: c08d14c7b22e07994e876d837e6f58642f340087
FirebaseCoreInternal: b444828ea7cfd594fca83046b95db98a2be4f290
FirebaseCrashlytics: 86d5bce01f42fa1db265f87ff1d591f04db610ec
FirebaseInstallations: 033d199474164db20c8350736842a94fe717b960
FirebaseSessions: e5f4caa188dc8bc6142abc974355be75b042215e
Firebase: 10c8cb12fb7ad2ae0c09ffc86cd9c1ab392a0031
firebase_core: a46c312d8bae4defa3d009b2aa7b5b413aeb394e
firebase_crashlytics: 3d12285fcbd865d576b9965bd4090cd8b68e11fd
FirebaseCore: 28045c1560a2600d284b9c45a904fe322dc890b6
FirebaseCoreExtension: 1c044fd46e95036cccb29134757c499613f3f564
FirebaseCoreInternal: 43c1788eaeee9d1b97caaa751af567ce11010d00
FirebaseCrashlytics: 81530595edb6d99f1918f723a6c33766a24a4c86
FirebaseInstallations: 390ea1d10a4d02b20c965cbfd527ee9b3b412acb
FirebaseSessions: 80c2bbdd28166267b3d132debe5f7531efdb00bc
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator_apple: 9157311f654584b9bb72686c55fc02a97b73f461
google_maps_flutter_ios: d9b9a308a1f14275c2967aefa639018a02bd44e8
GoogleDataTransport: 57c22343ab29bc686febbf7cbb13bad167c2d8fe
GoogleMaps: b47b67bd63d708477d6ff457da2d695c0d8ceb5f
GoogleMaps: 8939898920281c649150e0af74aa291c60f2e77d
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
permission_handler_apple: 036b856153a2b1f61f21030ff725f3e6fece2b78
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sqflite: 50a33e1d72bd59ee092a519a35d107502757ebed
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579

PODFILE CHECKSUM: 2dec3f67b1fa3eb41982ef2f40e0d15f34b91a30

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
2 changes: 1 addition & 1 deletion ios/build/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a519a7d998a5edb95fe7f5ad83a79eac
5ac2f0046179d5c246a76aed8c877cba
2 changes: 0 additions & 2 deletions lib/base/networking/apis/google/protobuf/empty.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import 'package:protobuf/protobuf.dart' as $pb;
/// service Foo {
/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
/// }
///
/// The JSON representation for `Empty` is empty JSON object `{}`.
class Empty extends $pb.GeneratedMessage {
factory Empty() => create();
Empty._() : super();
Expand Down
4 changes: 1 addition & 3 deletions lib/base/networking/apis/google/protobuf/timestamp.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
/// .setNanos((int) ((millis % 1000) * 1000000)).build();
///
///
/// Example 5: Compute Timestamp from Java `Instant.now()`.
///
/// Instant now = Instant.now();
Expand All @@ -74,7 +73,6 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
/// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
/// .setNanos(now.getNano()).build();
///
///
/// Example 6: Compute Timestamp from current time in Python.
///
/// timestamp = Timestamp()
Expand Down Expand Up @@ -104,7 +102,7 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
/// the Joda Time's [`ISODateTimeFormat.dateTime()`](
/// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
/// ) to obtain a formatter capable of generating timestamps in this format.
class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin {
factory Timestamp({
Expand Down
4 changes: 2 additions & 2 deletions lib/gradeComponent/model/grade.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ part 'grade.g.dart';
@JsonSerializable()
class Grade extends Searchable {
String get id {
return "${date.toIso8601String()}-$lvNumber";
return "${date?.toIso8601String()}-$lvNumber";
}

@JsonKey(name: "datum")
final DateTime date;
final DateTime? date;
@JsonKey(name: "lv_nummer")
final String lvNumber;
@JsonKey(name: "lv_semester")
Expand Down
6 changes: 4 additions & 2 deletions lib/gradeComponent/model/grade.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 15 additions & 9 deletions lib/homeComponent/contactComponent/views/contact_card_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:campus_flutter/base/helpers/string_parser.dart';
import 'package:campus_flutter/homeComponent/contactComponent/views/contact_card_loading_view.dart';
import 'package:campus_flutter/personDetailedComponent/model/person_details.dart';
import 'package:campus_flutter/personDetailedComponent/viewModel/person_details_viewmodel.dart';
import 'package:campus_flutter/profileComponent/model/profile.dart';
import 'package:campus_flutter/studentCardComponent/model/student_card.dart';
import 'package:campus_flutter/profileComponent/viewModel/profile_viewmodel.dart';
import 'package:campus_flutter/studentCardComponent/viewModel/student_card_viewmodel.dart';
Expand Down Expand Up @@ -36,10 +37,11 @@ class _ContactCardViewState extends ConsumerState<ContactCardView> {
(personDetails, studentCard) => (personDetails, studentCard),
),
builder: (context, snapshot) {
if (snapshot.hasData && snapshot.data?.$1 != null) {
if (snapshot.hasData || snapshot.hasError) {
return contactInfo(
snapshot.data!.$1!,
snapshot.data!.$2?.firstOrNull,
snapshot.data?.$1,
ref.read(profileViewModel).profile.value!,
snapshot.data?.$2?.firstOrNull,
);
} else {
return DelayedLoadingIndicator(
Expand All @@ -52,14 +54,18 @@ class _ContactCardViewState extends ConsumerState<ContactCardView> {
);
}

Widget contactInfo(PersonDetails data, StudentCard? studentCard) {
Widget contactInfo(
PersonDetails? data,
Profile profile,
StudentCard? studentCard,
) {
return Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: [
CircleAvatar(
backgroundImage: data.imageData != null
? Image.memory(base64DecodeImageData(data.imageData!)).image
backgroundImage: data?.imageData != null
? Image.memory(base64DecodeImageData(data!.imageData!)).image
: const AssetImage(
'assets/images/placeholders/portrait_placeholder.png',
),
Expand All @@ -73,13 +79,13 @@ class _ContactCardViewState extends ConsumerState<ContactCardView> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
data.fullName,
data?.fullName ?? profile.fullName,
style: Theme.of(context).textTheme.headlineSmall,
),
Text(
ref.watch(profileViewModel).profile.value?.tumID ?? "go42tum",
profile.tumID ?? "go42tum",
),
Text(data.email),
if (data != null) Text(data.email),
for (var studyProgram in studentCard?.studies.sublist(
0,
studentCard.studies.length >= 2
Expand Down
4 changes: 2 additions & 2 deletions lib/navigation_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ class NavigationService {

List<Widget> actions(BuildContext context) {
return [
if (!kIsWeb && MediaQuery.sizeOf(context).width < 600)
/*if (!kIsWeb && MediaQuery.sizeOf(context).width < 600)
IconButton(
onPressed: () => _openStudentCardSheet(context),
icon: const Icon(Icons.credit_card),
),
),*/
IconButton(
onPressed: () {
Navigator.of(context).push(
Expand Down
51 changes: 0 additions & 51 deletions lib/personDetailedComponent/viewModel/user_details_viewmodel.dart

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class UserPreferencesViewModel {
ref.read(selectedMapsApp.notifier).state = installedMaps.first;
}
} else {
ref.read(selectedMapsApp.notifier).state = installedMaps.first;
ref.read(selectedMapsApp.notifier).state =
installedMaps.firstOrNull;
}
case UserPreference.locale:
ref.read(customLocale.notifier).state =
Expand Down
Loading

0 comments on commit 8e7de8a

Please sign in to comment.