feat: wip message input
This commit is contained in:
+37
-19
@@ -206,13 +206,14 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
direction: Axis.horizontal,
|
direction: Axis.horizontal,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Row(
|
if (_giphyEnabled)
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
if (!widget.disableAttachments) _buildAttachmentButton(),
|
children: [
|
||||||
_buildGiphyButton(),
|
if (!widget.disableAttachments) _buildAttachmentButton(),
|
||||||
],
|
_buildGiphyButton(),
|
||||||
),
|
],
|
||||||
|
),
|
||||||
if (widget.actionsLocation == ActionsLocation.left)
|
if (widget.actionsLocation == ActionsLocation.left)
|
||||||
...widget.actions ?? [],
|
...widget.actions ?? [],
|
||||||
_buildTextInput(context),
|
_buildTextInput(context),
|
||||||
@@ -293,7 +294,25 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(32),
|
borderRadius: BorderRadius.circular(32),
|
||||||
),
|
),
|
||||||
contentPadding: EdgeInsets.all(4)
|
contentPadding: EdgeInsets.all(4),
|
||||||
|
prefix: Chip(
|
||||||
|
backgroundColor: StreamChatTheme.of(context).accentColor,
|
||||||
|
label: Row(
|
||||||
|
children: [
|
||||||
|
Icon(StreamIcons.lightning, color: Colors.white,),
|
||||||
|
SizedBox(width: 2,),
|
||||||
|
Text('GIPHY', style: TextStyle(color: Colors.white),),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: Icon(Icons.cancel_outlined),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_giphyEnabled = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)
|
||||||
),
|
),
|
||||||
textCapitalization: TextCapitalization.sentences,
|
textCapitalization: TextCapitalization.sentences,
|
||||||
),
|
),
|
||||||
@@ -872,16 +891,15 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
sendMessage();
|
sendMessage();
|
||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(
|
||||||
StreamIcons.send_message,
|
StreamIcons.send_message,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -898,7 +916,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
sendMessage();
|
sendMessage();
|
||||||
},
|
},
|
||||||
child: Transform.rotate(
|
child: Transform.rotate(
|
||||||
angle: - pi / 2,
|
angle: -pi / 2,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
StreamIcons.send_message,
|
StreamIcons.send_message,
|
||||||
color: StreamChatTheme.of(context).accentColor,
|
color: StreamChatTheme.of(context).accentColor,
|
||||||
|
|||||||
Reference in New Issue
Block a user