fix: Disable giphy button when editing, change close icon

This commit is contained in:
Deven Joshi
2020-10-19 13:45:43 +05:30
parent 3d68da4e78
commit 6998d4e9cc
2 changed files with 10 additions and 31 deletions
+9 -30
View File
@@ -193,37 +193,16 @@ class MessageActionsModal extends StatelessWidget {
'Edit message',
style: Theme.of(context).textTheme.headline6,
),
Container(
height: 30,
padding: const EdgeInsets.all(2.0),
child: AspectRatio(
aspectRatio: 1,
child: RawMaterialButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
elevation: 0,
highlightElevation: 0,
focusElevation: 0,
disabledElevation: 0,
hoverElevation: 0,
onPressed: () {
Navigator.of(context).pop();
},
fillColor:
Theme.of(context).brightness == Brightness.dark
? Colors.white.withOpacity(.1)
: Colors.black.withOpacity(.1),
padding: EdgeInsets.all(4),
child: Icon(
Icons.close,
size: 15,
color: StreamChatTheme.of(context)
.primaryIconTheme
.color,
),
),
IconButton(
icon: Icon(
Icons.cancel_outlined,
size: 15,
color:
StreamChatTheme.of(context).primaryIconTheme.color,
),
onPressed: () {
Navigator.of(context).pop();
},
),
],
),
+1 -1
View File
@@ -205,7 +205,7 @@ class MessageInputState extends State<MessageInput> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
if (!widget.disableAttachments) _buildAttachmentButton(),
_buildGiphyButton(),
if (widget.editMessage != null) _buildGiphyButton(),
],
),
if (widget.actionsLocation == ActionsLocation.left)