mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-18 11:20:16 +08:00
Fix issues detected by null safety
This commit is contained in:
@ -161,7 +161,10 @@ class GitHub implements GitHost {
|
||||
throw GitHostException.MissingAccessCode;
|
||||
}
|
||||
|
||||
var userInfo = await (getUserInfo() as FutureOr<UserInfo>);
|
||||
var userInfo = await getUserInfo();
|
||||
if (userInfo == null) {
|
||||
throw Exception("GitHub UserInfo not found. This is bad");
|
||||
}
|
||||
var owner = userInfo.username;
|
||||
var url = Uri.parse("https://api.github.com/repos/$owner/$name");
|
||||
|
||||
|
Reference in New Issue
Block a user