feat(github): twitter username at user screen

This commit is contained in:
Rongjian Zhang 2022-10-04 04:07:15 +08:00
parent 7a71d13f7d
commit 9b339c6cdf
2 changed files with 9 additions and 0 deletions

View File

@ -145,6 +145,14 @@ class _User extends StatelessWidget {
launchStringUrl(url); launchStringUrl(url);
}, },
), ),
if (p.twitterUsername != null)
AntListItem(
prefix: const Icon(Ionicons.logo_twitter),
child: Text('@${p.twitterUsername!}'),
onClick: () {
launchStringUrl('https://twitter.com/${p.twitterUsername}');
},
),
], ],
), ),
CommonStyle.verticalGap, CommonStyle.verticalGap,

View File

@ -30,6 +30,7 @@ fragment UserParts on User {
url url
email email
websiteUrl websiteUrl
twitterUsername
viewerCanFollow # TODO: remove in viewer query viewerCanFollow # TODO: remove in viewer query
viewerIsFollowing viewerIsFollowing
sponsors { sponsors {