-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
Made the posts UI better #2218
Closed
ShubhamTiwari55
wants to merge
18
commits into
PalisadoesFoundation:develop
from
ShubhamTiwari55:develop
Closed
Made the posts UI better #2218
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c1cedd1
Made the posts UI better
ShubhamTiwari55 ecb823a
code formatted
ShubhamTiwari55 e303685
code formatted
ShubhamTiwari55 2cbc4a6
error resolved
ShubhamTiwari55 db5e267
changes done
ShubhamTiwari55 69db8de
Merge branch 'PalisadoesFoundation:develop' into develop
ShubhamTiwari55 bc8037a
changes done
ShubhamTiwari55 b49ad3c
Merge branch 'develop' of https://github.com/ShubhamTiwari55/talawa i…
ShubhamTiwari55 1ad1621
changes done
ShubhamTiwari55 ce81c1f
code reformatted
ShubhamTiwari55 c15a04c
Merge branch 'PalisadoesFoundation:develop' into develop
ShubhamTiwari55 2b59db3
added test file for profile_page.dart
ShubhamTiwari55 3869247
Merge remote-tracking branch 'origin/develop' into develop
ShubhamTiwari55 973d320
code formatted
ShubhamTiwari55 e5bfb94
Added tests for individualPostView widget in the test file
ShubhamTiwari55 7b5b05f
Merge branch 'PalisadoesFoundation:develop' into develop
ShubhamTiwari55 7033e9e
Merge branch 'develop' into develop
ShubhamTiwari55 79f5b13
Merge branch 'PalisadoesFoundation:develop' into develop
ShubhamTiwari55 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,25 @@ | |
import 'package:talawa/enums/enums.dart'; | ||
import 'package:talawa/locator.dart'; | ||
import 'package:talawa/models/options/options.dart'; | ||
import 'package:talawa/models/organization/org_info.dart'; | ||
import 'package:talawa/models/post/post_model.dart'; | ||
import 'package:talawa/models/user/user_info.dart'; | ||
import 'package:talawa/plugins/talawa_plugin_provider.dart'; | ||
import 'package:talawa/services/size_config.dart'; | ||
import 'package:talawa/utils/app_localization.dart'; | ||
import 'package:talawa/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart'; | ||
import 'package:talawa/view_model/main_screen_view_model.dart'; | ||
import 'package:talawa/views/after_auth_screens/feed/individual_post.dart'; | ||
import 'package:talawa/views/base_view.dart'; | ||
import 'package:talawa/widgets/custom_avatar.dart'; | ||
import 'package:talawa/widgets/custom_list_tile.dart'; | ||
import 'package:talawa/widgets/from_palisadoes.dart'; | ||
import 'package:talawa/widgets/raised_round_edge_button.dart'; | ||
|
||
/// ProfilePage returns a widget that renders a page of user's profile. | ||
// ignore: must_be_immutable | ||
class ProfilePage extends StatelessWidget { | ||
const ProfilePage({ | ||
ProfilePage({ | ||
required Key key, | ||
this.homeModel, | ||
}) : super(key: key); | ||
|
@@ -28,6 +33,39 @@ | |
/// | ||
final MainScreenViewModel? homeModel; | ||
|
||
/// a_line_ending_with_end_punctuation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Write a meaningful documentation here. Moreover, any mock data should be outside the component. If necessary, create a new file for this. |
||
/// | ||
/// more_info_if_required | ||
Post samplePost = Post( | ||
sId: '123', | ||
description: 'This is a sample post description.', | ||
createdAt: DateTime.now().subtract(const Duration(days: 2)), | ||
imageUrl: 'https://example.com/sample_image.jpg', | ||
base64String: 'base64encodedstring', | ||
videoUrl: 'https://example.com/sample_video.mp4', | ||
creator: User( | ||
id: 'user123', | ||
firstName: 'John', | ||
lastName: 'Doe', | ||
email: '[email protected]', | ||
image: 'https://example.com/user_avatar.jpg', | ||
), | ||
organization: OrgInfo( | ||
id: 'org456', | ||
name: 'Sample Organization', | ||
description: 'This is a sample organization.', | ||
image: 'https://example.com/org_logo.png', | ||
), | ||
likedBy: [ | ||
LikedBy(sId: 'like123'), | ||
LikedBy(sId: 'like456'), | ||
], | ||
comments: [ | ||
Comments(sId: 'comment123'), | ||
Comments(sId: 'comment456'), | ||
], | ||
); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return BaseView<ProfilePageViewModel>( | ||
|
@@ -204,19 +242,8 @@ | |
const Tab(text: 'Tasks'), | ||
], | ||
views: [ | ||
ColoredBox( | ||
color: Theme.of(context).colorScheme.background, | ||
child: GridView.count( | ||
mainAxisSpacing: 5, | ||
crossAxisCount: 3, | ||
children: [ | ||
Image.asset('assets/images/pfp2.jpeg'), | ||
Image.asset('assets/images/pfp2.jpeg'), | ||
Image.asset('assets/images/pfp2.jpeg'), | ||
Image.asset('assets/images/pfp2.jpeg'), | ||
Image.asset('assets/images/pfp2.jpeg'), | ||
], | ||
), | ||
Container( | ||
child: IndividualPostView(post: samplePost), | ||
noman2002 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
), | ||
Container( | ||
color: Theme.of(context).colorScheme.background, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dummy data as suggested and mark this class as const again. Having const classes improves performance; we should not remove them unnecessarily.