feat: wip message input
This commit is contained in:
@@ -222,7 +222,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
? CrossFadeState.showFirst
|
? CrossFadeState.showFirst
|
||||||
: CrossFadeState.showSecond,
|
: CrossFadeState.showSecond,
|
||||||
firstChild: _buildSendButton(context),
|
firstChild: _buildSendButton(context),
|
||||||
secondChild: SizedBox(),
|
secondChild: _buildIdleSendButton(context),
|
||||||
duration: Duration(milliseconds: 300),
|
duration: Duration(milliseconds: 300),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
);
|
);
|
||||||
@@ -617,7 +617,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.attach_file_sharp,
|
Icons.attach_file_sharp,
|
||||||
),
|
),
|
||||||
angle: - 0.3,
|
angle: 0.4,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -835,6 +835,30 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
return res.file;
|
return res.file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildIdleSendButton(BuildContext context) {
|
||||||
|
return IconTheme(
|
||||||
|
data:
|
||||||
|
StreamChatTheme.of(context).channelTheme.messageInputButtonIconTheme,
|
||||||
|
child: Material(
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(32),
|
||||||
|
),
|
||||||
|
color: Colors.grey,
|
||||||
|
child: IconButton(
|
||||||
|
key: Key('sendButton'),
|
||||||
|
onPressed: () {
|
||||||
|
sendMessage();
|
||||||
|
},
|
||||||
|
icon: Icon(
|
||||||
|
Icons.arrow_forward,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildSendButton(BuildContext context) {
|
Widget _buildSendButton(BuildContext context) {
|
||||||
return IconTheme(
|
return IconTheme(
|
||||||
data:
|
data:
|
||||||
@@ -844,15 +868,15 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(32),
|
borderRadius: BorderRadius.circular(32),
|
||||||
),
|
),
|
||||||
color: Colors.transparent,
|
color: StreamChatTheme.of(context).accentColor,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
key: Key('sendButton'),
|
key: Key('sendButton'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
sendMessage();
|
sendMessage();
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.send,
|
Icons.arrow_upward,
|
||||||
color: StreamChatTheme.of(context).accentColor,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user