feat: remove the more options button from posts
This commit is contained in:
parent
45228099bd
commit
a3f67cf962
@ -74,7 +74,10 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
||||
canPop: true, // Allow back navigation to go back to feed page only
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Create Post', style: TextStyle(fontWeight: FontWeight.w600)),
|
||||
title: Text(
|
||||
'Create Post',
|
||||
style: TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
foregroundColor: Color(0xFF6A4C93),
|
||||
elevation: 0,
|
||||
@ -84,7 +87,10 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: _isLoading || isOverLimit || _bodyController.text.trim().isEmpty
|
||||
onPressed:
|
||||
_isLoading ||
|
||||
isOverLimit ||
|
||||
_bodyController.text.trim().isEmpty
|
||||
? null
|
||||
: _createPost,
|
||||
child: _isLoading
|
||||
@ -93,13 +99,16 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFF6A4C93)),
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Color(0xFF6A4C93),
|
||||
),
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'Post',
|
||||
style: TextStyle(
|
||||
color: _bodyController.text.trim().isEmpty || isOverLimit
|
||||
color:
|
||||
_bodyController.text.trim().isEmpty || isOverLimit
|
||||
? Colors.grey
|
||||
: Color(0xFF6A4C93),
|
||||
fontWeight: FontWeight.w600,
|
||||
@ -185,7 +194,9 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
||||
Text(
|
||||
'$remainingChars',
|
||||
style: TextStyle(
|
||||
color: isOverLimit ? Colors.red : Colors.grey[600],
|
||||
color: isOverLimit
|
||||
? Colors.red
|
||||
: Colors.grey[600],
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@ -197,10 +208,7 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'Post is too long. Please keep it under $_maxCharacters characters.',
|
||||
style: TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 12,
|
||||
),
|
||||
style: TextStyle(color: Colors.red, fontSize: 12),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -411,14 +411,6 @@ class _PostCardState extends State<PostCard> {
|
||||
],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('More options pressed')),
|
||||
);
|
||||
},
|
||||
icon: Icon(Icons.more_horiz, color: Colors.grey[600]),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user