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/41 #35

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Feature/41 #35

wants to merge 2 commits into from

Conversation

Vivian-Xiao1025
Copy link
Collaborator

Description: Link from post to user profile now working

Tests Performed: linked to bananalegend

Trello Card Link: https://trello.com/c/qdxmsV4D

@@ -31,6 +31,8 @@ dependencies:
json_annotation: ^4.7.0
image_stack: ^2.1.1
flutter_svg: ^1.1.5
flutter_dotenv: ^5.0.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not using this dependency can we please remove it?

}

Future<UserModel> fetchUser() async {
final response = await http.get(Uri.parse("$backendURL\\users\\$postUser"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason this uses \\ instead of /? The latter is more typical for paths, unless I'm missing something.

}
}

Future<UserModel> fetchUser() async {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method should be moved out of Widget class for later usage

@@ -22,6 +25,7 @@ class _ProfileScreenState extends State<ProfileScreen>
_tabController.addListener(() {
setState(() {});
});
_userModel = widget.userModel;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to have another member variable here, using widget.userModel in the code is OK

}

Future<UserModel> fetchUser() async {
final response = await http.get(Uri.parse("$backendURL\\users\\$postUser"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Dio instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants