feat: wip message input

This commit is contained in:
Deven Joshi
2020-10-16 18:15:04 +05:30
parent bd8a6f9ecc
commit 28bb2d2b7f
+21 -15
View File
@@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'dart:math';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@@ -619,7 +620,10 @@ class MessageInputState extends State<MessageInput> {
Widget _buildGiphyButton() { Widget _buildGiphyButton() {
return Center( return Center(
child: InkWell( child: InkWell(
child: Icon(StreamIcons.lightning), child: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(StreamIcons.lightning),
),
onTap: () { onTap: () {
setState(() { setState(() {
_giphyEnabled = true; _giphyEnabled = true;
@@ -632,7 +636,10 @@ class MessageInputState extends State<MessageInput> {
Widget _buildAttachmentButton() { Widget _buildAttachmentButton() {
return Center( return Center(
child: InkWell( child: InkWell(
child: Icon(StreamIcons.attach), child: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(StreamIcons.attach),
),
onTap: () { onTap: () {
showAttachmentModal(); showAttachmentModal();
}, },
@@ -859,17 +866,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: IconButton( child: InkWell(
iconSize: 14.0, onTap: () {
key: Key('sendButtonIdle'),
onPressed: () {
sendMessage(); sendMessage();
}, },
icon: Icon( child: Icon(
StreamIcons.send_message, StreamIcons.send_message,
color: Colors.grey, color: Colors.grey,
), ),
), )
), ),
), ),
); );
@@ -882,15 +887,16 @@ class MessageInputState extends State<MessageInput> {
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: IconButton( child: InkWell(
iconSize: 14.0, onTap: () {
key: Key('sendButton'),
onPressed: () {
sendMessage(); sendMessage();
}, },
icon: Icon( child: Transform.rotate(
StreamIcons.send_message, angle: - pi / 2,
color: StreamChatTheme.of(context).accentColor, child: Icon(
StreamIcons.send_message,
color: StreamChatTheme.of(context).accentColor,
),
), ),
), ),
), ),