fixes for review

This commit is contained in:
Deven Joshi
2020-12-29 18:53:05 +05:30
parent f8cf3a7d29
commit 9c53a295ae
6 changed files with 87 additions and 8 deletions
+1 -1
View File
@@ -246,7 +246,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
Widget _buildDeleteListTile() {
return OptionListTile(
title: 'Delete',
title: 'Delete Conversation',
leading: StreamSvgIcon.delete(
color: Colors.red,
size: 24.0,
+2 -2
View File
@@ -3,9 +3,9 @@ import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:jiffy/jiffy.dart';
import 'file:///Users/deven9852/Stream/stream-chat-flutter/example/lib/chat_info_screen.dart';
import 'package:stream_chat_flutter/src/option_list_tile.dart';
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
import 'chat_info_screen.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'main.dart';
@@ -701,7 +701,7 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
StreamChat.of(context).user.id != user.id &&
isUserAdmin)
_buildModalListTile(
StreamSvgIcon.userAdd(
StreamSvgIcon.Icon_user_settings(
color: Color(0xff7a7a7a),
size: 24.0,
),
+30 -1
View File
@@ -94,7 +94,36 @@ class _ChannelFileDisplayScreenState extends State<ChannelFileDisplayScreen> {
if (snapshot.data.isEmpty) {
return Center(
child: Text('Nothing here...'),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
StreamSvgIcon.files(
size: 136.0,
color: Color(0xffdbdbdb),
),
SizedBox(
height: 16.0,
),
Text(
'No Media',
style: TextStyle(
fontSize: 14.0,
color: Color(0xff000000),
),
),
SizedBox(
height: 8.0,
),
Text(
'Files sent in this chat will appear here',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.0,
color: Color(0xff000000).withOpacity(0.5),
),
),
],
),
);
}
+37 -4
View File
@@ -93,7 +93,36 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
if (snapshot.data.isEmpty) {
return Center(
child: Text('Nothing here...'),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
StreamSvgIcon.pictures(
size: 136.0,
color: Color(0xffdbdbdb),
),
SizedBox(
height: 16.0,
),
Text(
'No Media',
style: TextStyle(
fontSize: 14.0,
color: Color(0xff000000),
),
),
SizedBox(
height: 8.0,
),
Text(
'Photos or video sent in this chat will \nappear here',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.0,
color: Color(0xff000000).withOpacity(0.5),
),
),
],
),
);
}
@@ -157,9 +186,13 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
);
},
child: media[position].attachment.type == 'image'
? CachedNetworkImage(
imageUrl: media[position].attachment.imageUrl,
fit: BoxFit.cover,
? ImageAttachment(
attachment: media[position].attachment,
message: media[position].message,
size: Size(
MediaQuery.of(context).size.width * 0.8,
MediaQuery.of(context).size.height * 0.3,
),
)
: VideoPlayer(media[position].videoPlayer),
),
+12
View File
@@ -757,4 +757,16 @@ class StreamSvgIcon extends StatelessWidget {
height: size,
);
}
factory StreamSvgIcon.Icon_user_settings({
double size,
Color color,
}) {
return StreamSvgIcon(
assetName: 'Icon_user_settings.svg',
color: color,
width: size,
height: size,
);
}
}
+5
View File
@@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11ZM12 9C13.1046 9 14 8.10457 14 7C14 5.89543 13.1046 5 12 5C10.8954 5 10 5.89543 10 7C10 8.10457 10.8954 9 12 9Z" fill="#7A7A7A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 12C6.4686 12 4 15.6324 4 18C4 18.5523 3.55228 19 3 19C2.44771 19 2 18.5523 2 18C2 14.3676 5.5314 10 12 10C13.9955 10 15.7139 10.4121 17.1402 11.0991C17.6378 11.3387 17.8469 11.9363 17.6072 12.4339C17.3676 12.9315 16.7699 13.1406 16.2724 12.9009C15.1351 12.3532 13.716 12 12 12Z" fill="#7A7A7A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.5 14C18.2239 14 18 14.2239 18 14.5V15.2679L17.3349 14.884C17.0958 14.7459 16.79 14.8278 16.6519 15.067L16.1519 15.933C16.0139 16.1722 16.0958 16.478 16.3349 16.616L17 17L16.3349 17.384C16.0958 17.522 16.0138 17.8278 16.1519 18.067L16.6519 18.933C16.79 19.1722 17.0958 19.2541 17.3349 19.116L18 18.732V19.5C18 19.7761 18.2239 20 18.5 20H19.5C19.7761 20 20 19.7761 20 19.5V18.732L20.6651 19.116C20.9042 19.2541 21.21 19.1722 21.3481 18.933L21.8481 18.067C21.9861 17.8278 21.9042 17.522 21.6651 17.384L21 17L21.665 16.616C21.9042 16.478 21.9861 16.1722 21.8481 15.933L21.3481 15.067C21.21 14.8278 20.9042 14.7459 20.665 14.884L20 15.2679V14.5C20 14.2239 19.7761 14 19.5 14H18.5ZM19 18C19.5523 18 20 17.5523 20 17C20 16.4477 19.5523 16 19 16C18.4477 16 18 16.4477 18 17C18 17.5523 18.4477 18 19 18Z" fill="#7A7A7A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB