fix: minor

This commit is contained in:
Salvatore Giordano
2021-03-03 12:47:19 +01:00
parent 529995164d
commit b28ae12597
8 changed files with 114 additions and 77 deletions
@@ -25,7 +25,11 @@ dependencies:
sdk: flutter
stream_chat_flutter:
path: ../
stream_chat_persistence: ^1.3.0-beta
stream_chat_persistence:
git:
url: https://github.com/GetStream/stream-chat-flutter.git
ref: develop
path: packages/stream_chat_persistence
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
@@ -304,7 +304,7 @@ class MessageInputState extends State<MessageInput> {
Flex _buildTextField(BuildContext context) {
return Flex(
direction: Axis.horizontal,
crossAxisAlignment: CrossAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
if (!_commandEnabled) _buildExpandActionsButton(),
if (widget.actionsLocation == ActionsLocation.left)
@@ -1903,14 +1903,12 @@ class MessageInputState extends State<MessageInput> {
if (file == null) return;
final mimeType = file.path.split('/').last.mimeType;
final mimeType = file.name?.mimeType;
final extraDataMap = <String, dynamic>{};
if (camera) {
if (mimeType.type == 'video' || mimeType.type == 'image') {
attachmentType = mimeType.type;
}
if (mimeType.type == 'video' || mimeType.type == 'image') {
attachmentType = mimeType.type;
} else {
attachmentType = 'file';
}
+57 -55
View File
@@ -36,63 +36,65 @@ Future<bool> showConfirmationDialog(
)),
builder: (context) {
final effect = StreamChatTheme.of(context).colorTheme.borderTop;
return Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 26.0),
if (icon != null) icon,
SizedBox(height: 26.0),
Text(
title,
style: StreamChatTheme.of(context).textTheme.headlineBold,
),
SizedBox(height: 7.0),
Text(
question,
textAlign: TextAlign.center,
),
SizedBox(height: 36.0),
Container(
color: effect.color.withOpacity(effect.alpha ?? 1),
height: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
child: Text(
cancelText,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: StreamChatTheme.of(context)
.colorTheme
.black
.withOpacity(0.5)),
return SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 26.0),
if (icon != null) icon,
SizedBox(height: 26.0),
Text(
title,
style: StreamChatTheme.of(context).textTheme.headlineBold,
),
SizedBox(height: 7.0),
Text(
question,
textAlign: TextAlign.center,
),
SizedBox(height: 36.0),
Container(
color: effect.color.withOpacity(effect.alpha ?? 1),
height: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
child: Text(
cancelText,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: StreamChatTheme.of(context)
.colorTheme
.black
.withOpacity(0.5)),
),
onPressed: () {
Navigator.of(context).pop(false);
},
),
onPressed: () {
Navigator.of(context).pop(false);
},
),
TextButton(
child: Text(
okText,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: StreamChatTheme.of(context)
.colorTheme
.accentRed),
TextButton(
child: Text(
okText,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: StreamChatTheme.of(context)
.colorTheme
.accentRed),
),
onPressed: () {
Navigator.pop(context, true);
},
),
onPressed: () {
Navigator.pop(context, true);
},
),
],
),
],
],
),
],
),
);
});
}