From 1b00a0ae693d1303215d7b1af2a349dfc1d757bf Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sun, 6 Oct 2019 21:54:55 +0800 Subject: [PATCH] feat: handle svg files --- lib/screens/object.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/screens/object.dart b/lib/screens/object.dart index cf0043b..f36cb3b 100644 --- a/lib/screens/object.dart +++ b/lib/screens/object.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_highlight/theme_map.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:git_touch/models/code.dart'; import 'package:git_touch/models/theme.dart'; import 'package:git_touch/scaffolds/refresh_stateful.dart'; @@ -126,6 +127,8 @@ class ObjectScreen extends StatelessWidget { case 'webp': // TODO: All image types return Image.network(rawUrl); + case 'svg': + return SvgPicture.network(rawUrl); default: return SingleChildScrollView( scrollDirection: Axis.horizontal,