fix(github): update trending api

closes #110
This commit is contained in:
Rongjian Zhang 2020-10-06 21:59:29 +08:00
parent 11d61e163f
commit 36de5ec8a2
2 changed files with 5 additions and 3 deletions

View File

@ -10,15 +10,17 @@ import 'package:git_touch/widgets/repository_item.dart';
import 'package:provider/provider.dart';
class GhTrendingScreen extends StatelessWidget {
static final trending = GithubTrending(prefix: 'https://gtrend.yapie.me');
Widget build(BuildContext context) {
return TabStatefulScaffold<List>(
title: AppBarTitle('Trending'),
tabs: ['Repositories', 'Developers'],
fetchData: (tabIndex) async {
if (tabIndex == 0) {
return getTrendingRepositories();
return trending.getTrendingRepositories();
} else {
return getTrendingDevelopers();
return trending.getTrendingDevelopers();
}
},
bodyBuilder: (payload, activeTab) {

View File

@ -44,7 +44,7 @@ dependencies:
# url: git://github.com/pd4d10/github.dart.git
# ref: patch-1
# path: ../../github/github.dart
github_trending: ^0.2.0
github_trending: ^0.3.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0