1
0
mirror of https://github.com/git-touch/git-touch synced 2025-03-04 19:27:40 +01:00

improvement(gh): add trending user repo link

This commit is contained in:
Rongjian Zhang 2020-02-08 15:11:17 +08:00
parent 76115d0fca
commit f4ad7c33b8

View File

@ -5,6 +5,7 @@ import 'package:git_touch/models/theme.dart';
import 'package:git_touch/scaffolds/tab_stateful.dart'; import 'package:git_touch/scaffolds/tab_stateful.dart';
import 'package:git_touch/utils/utils.dart'; import 'package:git_touch/utils/utils.dart';
import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/app_bar_title.dart';
import 'package:git_touch/widgets/link.dart';
import 'package:git_touch/widgets/user_item.dart'; import 'package:git_touch/widgets/user_item.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:git_touch/widgets/repository_item.dart'; import 'package:git_touch/widgets/repository_item.dart';
@ -50,16 +51,25 @@ class GhTrendingScreen extends StatelessWidget {
login: item.username, login: item.username,
// name: item.name, // name: item.name,
avatarUrl: item.avatar, avatarUrl: item.avatar,
bio: Row( bio: Link(
children: <Widget>[ url: '/${item.username}/${item.repo.name}',
Icon( child: Row(
Octicons.repo, children: <Widget>[
size: 15, Icon(
color: theme.palette.secondaryText, Octicons.repo,
), size: 17,
SizedBox(width: 2), color: theme.palette.secondaryText,
Text(item.repo.name) ),
], SizedBox(width: 4),
Text(
'${item.username} / ${item.repo.name}',
style: TextStyle(
fontSize: 17,
color: theme.palette.secondaryText,
),
)
],
),
), ),
); );
default: default: