restore svg

This commit is contained in:
Salvatore Giordano
2021-03-02 11:03:41 +01:00
parent 15ac971396
commit 941ddf44ee
@@ -18,15 +18,24 @@ class StreamSvgIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
final key = Key('StreamSvgIcon-$assetName');
return SvgPicture.asset(
'lib/svgs/$assetName',
package: 'stream_chat_flutter',
key: key,
width: width,
height: height,
color: color,
alignment: Alignment.center,
);
return kIsWeb
? Image.network(
'packages/stream_chat_flutter/svgs/$assetName',
width: width,
height: height,
key: key,
color: color,
alignment: Alignment.center,
)
: SvgPicture.asset(
'lib/svgs/$assetName',
package: 'stream_chat_flutter',
key: key,
width: width,
height: height,
color: color,
alignment: Alignment.center,
);
}
factory StreamSvgIcon.settings({