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
|
canPop: true, // Allow back navigation to go back to feed page only
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text('Create Post', style: TextStyle(fontWeight: FontWeight.w600)),
|
title: Text(
|
||||||
|
'Create Post',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
foregroundColor: Color(0xFF6A4C93),
|
foregroundColor: Color(0xFF6A4C93),
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
@ -84,7 +87,10 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
|||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: _isLoading || isOverLimit || _bodyController.text.trim().isEmpty
|
onPressed:
|
||||||
|
_isLoading ||
|
||||||
|
isOverLimit ||
|
||||||
|
_bodyController.text.trim().isEmpty
|
||||||
? null
|
? null
|
||||||
: _createPost,
|
: _createPost,
|
||||||
child: _isLoading
|
child: _isLoading
|
||||||
@ -93,13 +99,16 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
|||||||
height: 20,
|
height: 20,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFF6A4C93)),
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
|
Color(0xFF6A4C93),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text(
|
: Text(
|
||||||
'Post',
|
'Post',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: _bodyController.text.trim().isEmpty || isOverLimit
|
color:
|
||||||
|
_bodyController.text.trim().isEmpty || isOverLimit
|
||||||
? Colors.grey
|
? Colors.grey
|
||||||
: Color(0xFF6A4C93),
|
: Color(0xFF6A4C93),
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
@ -185,7 +194,9 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
|||||||
Text(
|
Text(
|
||||||
'$remainingChars',
|
'$remainingChars',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: isOverLimit ? Colors.red : Colors.grey[600],
|
color: isOverLimit
|
||||||
|
? Colors.red
|
||||||
|
: Colors.grey[600],
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
@ -197,10 +208,7 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
|
|||||||
padding: EdgeInsets.only(top: 8),
|
padding: EdgeInsets.only(top: 8),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Post is too long. Please keep it under $_maxCharacters characters.',
|
'Post is too long. Please keep it under $_maxCharacters characters.',
|
||||||
style: TextStyle(
|
style: TextStyle(color: Colors.red, fontSize: 12),
|
||||||
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),
|
SizedBox(height: 12),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user