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

Fix comment box color and text input #224

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ class _LoginViewMobileState extends State<LoginViewMobile> {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
state.message,
"Invalid email or password, please try again.",
style: AppTextStyles.s14(
color: AppColor.appWhite,
fontType: FontType.MEDIUM,
),
),
backgroundColor: AppColor.appSecondary,
backgroundColor: AppColor.appWarningRed,
),
);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/presentation/feed/desktop/widgets/feed_post_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,11 @@ class _FeedPostCardState extends State<FeedPostCard>
SizedBox(
width: 430,
child: TextFormField(
cursorColor: AppColor.appPrimary,
focusNode: commentFocusNode,
controller: commentController,
decoration: InputDecoration(
focusColor: AppColor.appPrimary,
suffixIcon: GestureDetector(
onTap: () {
locator<CommentsBloc>().add(
Expand All @@ -326,6 +328,7 @@ class _FeedPostCardState extends State<FeedPostCard>
comment: commentController.text,
),
);
commentController.clear();
},
child: Padding(
padding: const EdgeInsets.all(8.0),
Expand Down
10 changes: 10 additions & 0 deletions lib/presentation/feed/mobile/widgets/comment_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,17 @@ class _CommentScreenState extends State<CommentScreen> {
SizedBox(
width: MediaQuery.sizeOf(context).width * 2.2 / 3,
child: TextFormField(
cursorColor: AppColor.appPrimary,
focusNode: commentFocusNode,
controller: commentController,
decoration: InputDecoration(
focusedBorder: const OutlineInputBorder(
borderSide:
BorderSide(color: AppColor.appPrimary, width: 2),
borderRadius: BorderRadius.all(
Radius.circular(20),
),
),
suffixIcon: GestureDetector(
onTap: () {
locator<CommentsBloc>().add(
Expand All @@ -224,6 +232,8 @@ class _CommentScreenState extends State<CommentScreen> {
comment: commentController.text,
),
);
// clear the text field
commentController.clear();
},
child: Padding(
padding: const EdgeInsets.all(8.0),
Expand Down
1 change: 1 addition & 0 deletions lib/utils/app_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ class AppColor {
static const Color appGrey = Color(0xFF4B5669);
static const Color appTextGrey = Color(0xFF838B98);
static const Color appTextLightGrey = Color(0xFF707988);
static const Color appWarningRed = Color(0xFFE74C3C);
}