feat: update dependencies, ui and linting
This commit is contained in:
@@ -2,7 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart'
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart'
|
||||
show Attachment, AttachmentFile, Message, StreamChannel;
|
||||
|
||||
class MessageInput extends StatefulWidget {
|
||||
@@ -59,28 +59,27 @@ class _MessageInputState extends State<MessageInput> {
|
||||
);
|
||||
await channel.sendMessage(message);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Icon(
|
||||
CupertinoIcons.camera_fill,
|
||||
color: CupertinoColors.systemGrey,
|
||||
size: 35,
|
||||
size: 32,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: CupertinoTextField(
|
||||
controller: textController,
|
||||
maxLines: 10,
|
||||
minLines: 1,
|
||||
onSubmitted: (input) async {
|
||||
await sendMessage(context, input);
|
||||
},
|
||||
placeholder: 'Text Message',
|
||||
prefix: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
'',
|
||||
), //trick to add padding around placeholder iMessage text
|
||||
),
|
||||
placeholder: 'iMessage',
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
|
||||
suffixMode: OverlayVisibilityMode.editing,
|
||||
suffix: GestureDetector(
|
||||
onTap: () async {
|
||||
if (textController.value.text.isNotEmpty) {
|
||||
@@ -88,20 +87,16 @@ class _MessageInputState extends State<MessageInput> {
|
||||
textController.clear();
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Icon(
|
||||
CupertinoIcons.arrow_up_circle_fill,
|
||||
color: CupertinoColors.activeGreen,
|
||||
size: 35,
|
||||
),
|
||||
child: const Icon(
|
||||
CupertinoIcons.arrow_up_circle_fill,
|
||||
color: CupertinoColors.activeBlue,
|
||||
size: 35,
|
||||
),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: CupertinoColors.systemGrey,
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.circular(35))),
|
||||
border: Border.all(color: CupertinoColors.systemGrey),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(35)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user