Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
analyzer:
exclude:
- build/**
- android/**
- ios/**

formatter:
page_width: 120
Expand Down
11 changes: 10 additions & 1 deletion lib/core/services/user.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:campus_mobile_experimental/app_networking.dart';
import 'package:campus_mobile_experimental/core/models/user_profile.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';

class UserProfileService {
Expand All @@ -18,11 +19,19 @@ class UserProfileService {
_error = null;
_isLoading = true;
try {
// TODO(prisha): temporary debug logging to inspect raw user profile JSON; remove before committing.
final rawResponse = await NetworkHelper.authorizedFetch(_endpoint + '/profile', headers);
if (kDebugMode) {
debugPrint('USER PROFILE RAW: $rawResponse');
}
_userProfileModel = userProfileModelFromJson(
await NetworkHelper.authorizedFetch(_endpoint + '/profile', headers),
rawResponse,
);
return true;
} catch (e) {
if (kDebugMode) {
debugPrint('USER PROFILE FETCH FAILED: $e');
}
_error = e.toString();
return false;
} finally {
Expand Down
16 changes: 8 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -845,10 +845,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
version: "0.12.19"
version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
Expand All @@ -869,10 +869,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -1218,10 +1218,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
version: "0.7.11"
version: "0.7.12"
timezone:
dependency: transitive
description:
Expand Down Expand Up @@ -1354,10 +1354,10 @@ packages:
dependency: transitive
description:
name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
sha256: fa49e1674cb84acb900141714e6c6e1f9ae099827c24d141430ff6819db4e1bc
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.4.4"
visibility_detector:
dependency: "direct main"
description:
Expand Down
Loading