Skip to content

Commit

Permalink
docs(overview): comment widgets, enums and fix typo in comment_widget…
Browse files Browse the repository at this point in the history
….dart
  • Loading branch information
CHOOSEIT committed Mar 26, 2024
1 parent 51472a7 commit 3802dba
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import "package:flutter/material.dart";
import "package:proxima/views/filter_widgets/timeline_filter/timeline_filters.dart";

/*
This widget is the dropdown menu for the timeline filters.
*/
class TimeLineFiltersDropDown extends StatelessWidget {
const TimeLineFiltersDropDown({
super.key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import "package:flutter/material.dart";

/*
This enum is used to create the timeline filters.
It contains the name and icon of the filters.
*/
enum TimeLineFilters {
f1("Filter 1", Icon(Icons.abc)),
f2("Filter 2", Icon(Icons.filter_none)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import "package:flutter/material.dart";

/*
This enum is used to create the navigation bar routes.
It contains the name and icon of the routes.
*/
enum NavigationbarRoutes {
//TODO set the routes for the pages
timeline("Feed", Icon(Icons.home)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import "package:flutter/material.dart";
import "package:hooks_riverpod/hooks_riverpod.dart";
import "package:proxima/views/home/bottom_navigation_bar/navigation_bar_routes.dart";

/*
This widget is the bottom navigation bar of the home page.
It contains the navigation routes to the different pages.
*/
class NavigationBottomBar extends HookConsumerWidget {
const NavigationBottomBar({super.key});

Expand Down
4 changes: 4 additions & 0 deletions lib/views/home/posts/home_feed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import "package:flutter/material.dart";
import "package:hooks_riverpod/hooks_riverpod.dart";
import "package:proxima/views/home/posts/post_card/post_card.dart";

/*
This widget is the feed of the home page
It contains the posts
*/
class HomeFeed extends HookConsumerWidget {
const HomeFeed({super.key});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import "package:flutter/material.dart";

/*
This widget is used to display the comment number in the post card.
It contains the comment icon and the number of comments.
*/
class CommentWidget extends StatelessWidget {
final int commentNumber;
const CommentWidget({
Expand Down
7 changes: 6 additions & 1 deletion lib/views/home/posts/post_card/post_card.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import "package:flutter/material.dart";
import "package:proxima/views/home/posts/post_card/commend_widget.dart";
import "package:proxima/views/home/posts/post_card/comment_widget.dart";
import "package:proxima/views/home/posts/post_card/user_bar_widget.dart";
import "package:proxima/views/home/posts/post_card/votes_widget.dart";

/*
This widget is used to display the post card in the home feed.
It contains the post title, description, votes, comments
and the user (profile picture and username).
*/
class PostCard extends StatelessWidget {
final String title;
final String description;
Expand Down
4 changes: 4 additions & 0 deletions lib/views/home/posts/post_card/user_bar_widget.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import "package:flutter/material.dart";

/*
This widget is used to display the user bar in the post card.
It contains the user's profile picture and username.
*/
class UserBarWidget extends StatelessWidget {
const UserBarWidget({
super.key,
Expand Down
4 changes: 4 additions & 0 deletions lib/views/home/posts/post_card/votes_widget.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import "package:flutter/material.dart";

/*
This widget is used to display the votes of a post.
It contains two buttons to upvote and downvote the post and the number of votes.
*/
class VotesWidget extends StatelessWidget {
final int votes;
const VotesWidget({
Expand Down
4 changes: 4 additions & 0 deletions lib/views/home/top_bar/home_top_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import "package:flutter/material.dart";
import "package:hooks_riverpod/hooks_riverpod.dart";
import "package:proxima/views/filter_widgets/timeline_filter/timeline_filter_dropdown.dart";

/*
This widget is the top bar of the home page
It contains the timeline filters and the user profile picture
*/
class HomeTopBar extends HookConsumerWidget implements PreferredSizeWidget {
const HomeTopBar({super.key});

Expand Down

0 comments on commit 3802dba

Please sign in to comment.