From 58b079abbad26b569a13eef3ab7c7fe005e4596f Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 25 Nov 2020 15:29:08 +0100 Subject: [PATCH] fix svgs icons --- example/lib/new_group_chat_screen.dart | 18 +++++++++++++++--- example/pubspec.yaml | 2 +- lib/src/stream_svg_icon.dart | 2 -- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/example/lib/new_group_chat_screen.dart b/example/lib/new_group_chat_screen.dart index a11767c3..8361c895 100644 --- a/example/lib/new_group_chat_screen.dart +++ b/example/lib/new_group_chat_screen.dart @@ -100,9 +100,21 @@ class _NewGroupChatScreenState extends State { child: TextField( controller: _controller, decoration: InputDecoration( - prefixIcon: StreamSvgIcon.search( - color: Colors.black, - size: 24, + prefixIconConstraints: BoxConstraints.tight( + Size( + 40, + 24, + ), + ), + prefixIcon: Padding( + padding: const EdgeInsets.only( + left: 8, + right: 8, + ), + child: StreamSvgIcon.search( + color: Colors.black, + size: 24, + ), ), hintText: 'Search', hintStyle: TextStyle( diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 43eb867e..491dbbb7 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: example description: A new Flutter project. -version: 1.0.72+74 +version: 1.0.73+75 environment: sdk: ">=2.2.2 <3.0.0" diff --git a/lib/src/stream_svg_icon.dart b/lib/src/stream_svg_icon.dart index 19daca34..2851df3a 100644 --- a/lib/src/stream_svg_icon.dart +++ b/lib/src/stream_svg_icon.dart @@ -25,7 +25,6 @@ class StreamSvgIcon extends StatelessWidget { height: height, key: key, color: color, - fit: BoxFit.scaleDown, alignment: Alignment.center, ) : SvgPicture.asset( @@ -35,7 +34,6 @@ class StreamSvgIcon extends StatelessWidget { width: width, height: height, color: color, - fit: BoxFit.scaleDown, alignment: Alignment.center, ); }