mirror of
https://github.com/git-touch/git-touch
synced 2024-12-17 02:38:39 +01:00
feat: handle svg files
This commit is contained in:
parent
1f301ab3ef
commit
1b00a0ae69
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user