mirror of
https://github.com/git-touch/git-touch
synced 2025-01-31 08:04:51 +01:00
parent
11d61e163f
commit
36de5ec8a2
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user