mirror of
https://github.com/git-touch/git-touch
synced 2025-01-31 08:04:51 +01:00
parent
62b02ed504
commit
968019b932
@ -1,7 +1,6 @@
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/gitlab.dart';
|
||||
import 'package:git_touch/scaffolds/refresh_stateful.dart';
|
||||
@ -77,13 +76,13 @@ class GlProjectScreen extends StatelessWidget {
|
||||
owner: p.namespace.name,
|
||||
name: p.name,
|
||||
description: p.description,
|
||||
trailings: <Widget>[
|
||||
if (badges.isNotEmpty)
|
||||
Wrap(spacing: 4, runSpacing: 4, children: [
|
||||
for (var label in badges)
|
||||
SvgPicture.network(label.renderedImageUrl, height: 20),
|
||||
])
|
||||
],
|
||||
// trailings: <Widget>[
|
||||
// if (badges.isNotEmpty)
|
||||
// Wrap(spacing: 4, runSpacing: 4, children: [
|
||||
// for (var label in badges)
|
||||
// SvgPicture.network(label.renderedImageUrl, height: 20),
|
||||
// ])
|
||||
// ],
|
||||
),
|
||||
CommonStyle.border,
|
||||
Row(
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:git_touch/models/code.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
@ -33,13 +32,13 @@ class MarkdownView extends StatelessWidget {
|
||||
selectable: true,
|
||||
imageBuilder: (uri, title, alt) {
|
||||
if (uri.scheme == 'http' || uri.scheme == 'https') {
|
||||
if (uri.path.endsWith('.svg')) {
|
||||
return SvgPicture.network(uri.toString());
|
||||
} else {
|
||||
return Image.network(uri.toString());
|
||||
}
|
||||
// TODO: svg support
|
||||
// if (uri.path.endsWith('.svg')) {
|
||||
// return SvgPicture.network(uri.toString());
|
||||
// }
|
||||
return Image.network(uri.toString());
|
||||
} else {
|
||||
return Container();
|
||||
return Container(); // TODO: relative path image
|
||||
}
|
||||
},
|
||||
onTapLink: (url) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user