From b2b6ef47958c58de5f70f2da569d9bdf65e4163a Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Tue, 3 Sep 2019 14:32:17 +0800 Subject: [PATCH] fix: commit without related user --- lib/screens/commits.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/screens/commits.dart b/lib/screens/commits.dart index f966021..19d6f11 100644 --- a/lib/screens/commits.dart +++ b/lib/screens/commits.dart @@ -33,6 +33,7 @@ class CommitsScreen extends StatelessWidget { messageHeadline committedDate author { + name email avatarUrl user { @@ -82,7 +83,10 @@ class CommitsScreen extends StatelessWidget { SizedBox(height: 4), Row( children: [ - Text(payload['author']['user']['login'], + Text( + payload['author']['user'] == null + ? payload['author']['name'] + : payload['author']['user']['login'], style: TextStyle( fontWeight: FontWeight.w500, fontSize: 14)), Text(