diff --git a/example/lib/chat_info_screen.dart b/example/lib/chat_info_screen.dart index eb12bfee..5f7f7c63 100644 --- a/example/lib/chat_info_screen.dart +++ b/example/lib/chat_info_screen.dart @@ -246,7 +246,7 @@ class _ChatInfoScreenState extends State { Widget _buildDeleteListTile() { return OptionListTile( - title: 'Delete', + title: 'Delete Conversation', leading: StreamSvgIcon.delete( color: Colors.red, size: 24.0, diff --git a/example/lib/group_info_screen.dart b/example/lib/group_info_screen.dart index 5d1c2063..b4972165 100644 --- a/example/lib/group_info_screen.dart +++ b/example/lib/group_info_screen.dart @@ -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 { StreamChat.of(context).user.id != user.id && isUserAdmin) _buildModalListTile( - StreamSvgIcon.userAdd( + StreamSvgIcon.Icon_user_settings( color: Color(0xff7a7a7a), size: 24.0, ), diff --git a/lib/src/channel_file_display_screen.dart b/lib/src/channel_file_display_screen.dart index 8ea7daa9..c8b34ea0 100644 --- a/lib/src/channel_file_display_screen.dart +++ b/lib/src/channel_file_display_screen.dart @@ -94,7 +94,36 @@ class _ChannelFileDisplayScreenState extends State { 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), + ), + ), + ], + ), ); } diff --git a/lib/src/channel_media_display_screen.dart b/lib/src/channel_media_display_screen.dart index d47709cd..41ec41b3 100644 --- a/lib/src/channel_media_display_screen.dart +++ b/lib/src/channel_media_display_screen.dart @@ -93,7 +93,36 @@ class _ChannelMediaDisplayScreenState extends State { 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 { ); }, 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), ), diff --git a/lib/src/stream_svg_icon.dart b/lib/src/stream_svg_icon.dart index 98ce0f8e..0d8e3a95 100644 --- a/lib/src/stream_svg_icon.dart +++ b/lib/src/stream_svg_icon.dart @@ -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, + ); + } } diff --git a/lib/svgs/Icon_user_settings.svg b/lib/svgs/Icon_user_settings.svg new file mode 100644 index 00000000..36ce6115 --- /dev/null +++ b/lib/svgs/Icon_user_settings.svg @@ -0,0 +1,5 @@ + + + + +