diff --git a/lib/src/image_actions_modal.dart b/lib/src/image_actions_modal.dart index 19f27055..7e50a4f7 100644 --- a/lib/src/image_actions_modal.dart +++ b/lib/src/image_actions_modal.dart @@ -83,8 +83,7 @@ class ImageActionsModal extends StatelessWidget { ], ), IconButton( - icon: Icon( - StreamIcons.close, + icon: StreamSvgIcon.close( size: 24.0, color: Colors.white, ), @@ -111,17 +110,31 @@ class ImageActionsModal extends StatelessWidget { children: ListTile.divideTiles( context: context, tiles: [ - _buildButton(context, 'Reply', - StreamIcons.curve_line_down_left, () {}), - _buildButton(context, 'Show in Chat', StreamIcons.eye, - () { + _buildButton( + context, + 'Reply', + StreamSvgIcon.Icon_curve_line_left_up( + size: 24.0, + color: Colors.black.withOpacity(0.5), + ), + () {}), + _buildButton( + context, + 'Show in Chat', + StreamSvgIcon.eye( + size: 24.0, + color: Colors.black, + ), () { Navigator.pop(context); Navigator.pop(context); }), _buildButton( context, 'Save ${urls[currentIndex].type == 'video' ? 'Video' : 'Image'}', - StreamIcons.save_1, () async { + StreamSvgIcon.Icon_save( + size: 24.0, + color: Colors.black.withOpacity(0.5), + ), () async { var url = urls[currentIndex].imageUrl ?? urls[currentIndex].assetUrl ?? urls[currentIndex].thumbUrl; @@ -135,8 +148,13 @@ class ImageActionsModal extends StatelessWidget { } }), if (StreamChat.of(context).user.id == message.user.id) - _buildButton(context, 'Delete', StreamIcons.delete, - () { + _buildButton( + context, + 'Delete', + StreamSvgIcon.delete( + size: 24.0, + color: Colors.black, + ), () { Navigator.pop(context); Navigator.pop(context); StreamChat.of(context).client.deleteMessage( @@ -157,7 +175,7 @@ class ImageActionsModal extends StatelessWidget { } Widget _buildButton( - context, String title, IconData iconData, VoidCallback onTap, + context, String title, StreamSvgIcon icon, VoidCallback onTap, {Color color}) { var titleStyle = TextStyle( fontSize: 14.5, @@ -174,11 +192,7 @@ class ImageActionsModal extends StatelessWidget { style: color == null ? titleStyle : titleStyle.copyWith(color: color), ), - leading: Icon( - iconData, - color: color ?? StreamChatTheme.of(context).primaryIconTheme.color, - size: 24.0, - ), + leading: icon, ), ), ); diff --git a/lib/src/image_footer.dart b/lib/src/image_footer.dart index 8d2bf30f..5461e139 100644 --- a/lib/src/image_footer.dart +++ b/lib/src/image_footer.dart @@ -12,7 +12,6 @@ import 'package:path_provider/path_provider.dart'; import 'package:stream_chat/stream_chat.dart'; import 'package:stream_chat_flutter/src/stream_chat.dart'; import 'package:stream_chat_flutter/src/stream_chat_theme.dart'; -import 'package:stream_chat_flutter/src/stream_icons.dart'; import 'package:stream_chat_flutter/src/user_avatar.dart'; import 'package:stream_chat_flutter/stream_chat_flutter.dart'; @@ -81,8 +80,7 @@ class _ImageFooterState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ IconButton( - icon: Icon( - StreamIcons.share_1, + icon: StreamSvgIcon.icon_SHARE( size: 24.0, color: Colors.black, ), @@ -111,8 +109,7 @@ class _ImageFooterState extends State { ), ), IconButton( - icon: Icon( - StreamIcons.grid, + icon: StreamSvgIcon.Icon_grid( color: Colors.black, ), onPressed: () { @@ -160,8 +157,7 @@ class _ImageFooterState extends State { Align( alignment: Alignment.centerRight, child: IconButton( - icon: Icon( - StreamIcons.close, + icon: StreamSvgIcon.close( color: Colors.black, ), onPressed: () { @@ -446,13 +442,11 @@ class _ImageFooterState extends State { prefixIconConstraints: BoxConstraints.tight(Size(38.0, 38.0)), prefixIcon: Transform.scale( - scale: 1.2, - alignment: Alignment.center, - child: Icon( - StreamIcons.search, - color: Colors.black, - ), - ), + scale: 1.2, + alignment: Alignment.center, + child: StreamSvgIcon.search( + color: Colors.black, + )), hintText: 'Search', border: OutlineInputBorder( borderRadius: BorderRadius.circular(32.0), @@ -472,8 +466,7 @@ class _ImageFooterState extends State { width: 8.0, ), IconButton( - icon: Icon( - StreamIcons.close_circle, + icon: StreamSvgIcon.close_small( color: Colors.black.withOpacity(0.5), ), onPressed: () { @@ -494,8 +487,7 @@ class _ImageFooterState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 6.0), child: IconButton( - icon: Icon( - StreamIcons.search, + icon: StreamSvgIcon.search( color: Colors.black, ), iconSize: 24.0, @@ -520,8 +512,7 @@ class _ImageFooterState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 6.0), child: IconButton( - icon: Icon( - StreamIcons.share, + icon: StreamSvgIcon.search( color: Colors.black, ), iconSize: 24.0, @@ -612,8 +603,7 @@ class _ImageFooterState extends State { }, child: Transform.rotate( angle: -pi / 2, - child: Icon( - StreamIcons.send_message, + child: StreamSvgIcon.Icon_send_message( color: StreamChatTheme.of(context).accentColor, ), ), @@ -630,8 +620,7 @@ class _ImageFooterState extends State { child: Center( child: InkWell( onTap: () {}, - child: Icon( - StreamIcons.send_message, + child: StreamSvgIcon.Icon_send_message( color: Colors.grey, ), )), diff --git a/lib/src/image_header.dart b/lib/src/image_header.dart index 512d8b14..62c3f8ec 100644 --- a/lib/src/image_header.dart +++ b/lib/src/image_header.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stream_chat/stream_chat.dart'; import 'package:stream_chat_flutter/src/stream_chat_theme.dart'; -import 'package:stream_chat_flutter/src/stream_icons.dart'; +import 'package:stream_chat_flutter/src/stream_svg_icon.dart'; import 'image_actions_modal.dart'; import 'stream_channel.dart'; @@ -49,8 +49,7 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget { elevation: 1, leading: showBackButton ? IconButton( - icon: Icon( - StreamIcons.close, + icon: StreamSvgIcon.close( color: Colors.black, size: 24.0, ), @@ -61,10 +60,8 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget { StreamChatTheme.of(context).channelTheme.channelHeaderTheme.color, actions: [ IconButton( - icon: Icon( - StreamIcons.menu_point_v, + icon: StreamSvgIcon.Icon_menu_point_v( color: Colors.black, - size: 24.0, ), onPressed: () { _showMessageActionModalBottomSheet(context); diff --git a/lib/src/stream_svg_icon.dart b/lib/src/stream_svg_icon.dart index 9a87ce9d..87d21c14 100644 --- a/lib/src/stream_svg_icon.dart +++ b/lib/src/stream_svg_icon.dart @@ -397,4 +397,76 @@ class StreamSvgIcon extends StatelessWidget { height: size, ); } + + factory StreamSvgIcon.Icon_curve_line_left_up({ + double size, + Color color, + }) { + return StreamSvgIcon( + assetName: 'Icon_curve_line_left_up.svg', + color: color, + width: size, + height: size, + ); + } + + factory StreamSvgIcon.icon_SHARE({ + double size, + Color color, + }) { + return StreamSvgIcon( + assetName: 'icon_SHARE.svg', + color: color, + width: size, + height: size, + ); + } + + factory StreamSvgIcon.Icon_grid({ + double size, + Color color, + }) { + return StreamSvgIcon( + assetName: 'Icon_grid.svg', + color: color, + width: size, + height: size, + ); + } + + factory StreamSvgIcon.Icon_send_message({ + double size, + Color color, + }) { + return StreamSvgIcon( + assetName: 'Icon_send_message.svg', + color: color, + width: size, + height: size, + ); + } + + factory StreamSvgIcon.Icon_menu_point_v({ + double size, + Color color, + }) { + return StreamSvgIcon( + assetName: 'Icon_menu_point_v.svg', + color: color, + width: size, + height: size, + ); + } + + factory StreamSvgIcon.Icon_save({ + double size, + Color color, + }) { + return StreamSvgIcon( + assetName: 'Icon_save.svg', + color: color, + width: size, + height: size, + ); + } } diff --git a/lib/svgs/Icon_menu_point_v.svg b/lib/svgs/Icon_menu_point_v.svg new file mode 100644 index 00000000..f7b61163 --- /dev/null +++ b/lib/svgs/Icon_menu_point_v.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/lib/svgs/Icon_save.svg b/lib/svgs/Icon_save.svg new file mode 100644 index 00000000..14bedc6f --- /dev/null +++ b/lib/svgs/Icon_save.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/svgs/Icon_send_message.svg b/lib/svgs/Icon_send_message.svg new file mode 100644 index 00000000..0d504a40 --- /dev/null +++ b/lib/svgs/Icon_send_message.svg @@ -0,0 +1,3 @@ + + +