fix: entry item count

This commit is contained in:
Rongjian Zhang 2020-10-05 18:26:43 +08:00
parent 61ad3ebb16
commit 7d3e916af7
3 changed files with 2 additions and 9 deletions

View File

@ -51,7 +51,6 @@ class GtRepoScreen extends StatelessWidget {
Row(
children: <Widget>[
EntryItem(
count: 0,
text: 'Watchers',
url: '/gitea/$owner/$name/watchers',
),

View File

@ -103,22 +103,18 @@ class GtUserScreen extends StatelessWidget {
CommonStyle.border,
Row(children: [
EntryItem(
count: 0, // TODO: count
text: 'Repositories',
url: '/gitea/$login?tab=repositories',
),
EntryItem(
count: 0,
text: 'Stars',
url: '/gitea/$login?tab=stars',
),
EntryItem(
count: 0,
text: 'Followers',
url: '/gitea/$login?tab=followers',
),
EntryItem(
count: 0,
text: 'Following',
url: '/gitea/$login?tab=following',
),
@ -158,12 +154,10 @@ class GtUserScreen extends StatelessWidget {
CommonStyle.border,
Row(children: [
EntryItem(
count: 0,
text: 'Repositories',
url: '/gitea/$login?tab=orgrepo',
),
EntryItem(
count: 0,
text: 'Members',
url: '/gitea/$login?tab=people',
),

View File

@ -10,8 +10,8 @@ class EntryItem extends StatelessWidget {
final String url;
EntryItem({
@required this.count,
@required this.text,
this.count,
this.url,
});
@ -27,7 +27,7 @@ class EntryItem extends StatelessWidget {
child: Column(
children: <Widget>[
Text(
numberFormat.format(count),
count == null ? '?' : numberFormat.format(count),
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,