Created
January 21, 2019 20:16
-
-
Save felangel/a507da75dcfff25bc90eb48ba03308e1 to your computer and use it in GitHub Desktop.
[github_search] Search Result Item Model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:common_github_search/common_github_search.dart'; | |
class SearchResultItem { | |
final String fullName; | |
final String htmlUrl; | |
final GithubUser owner; | |
const SearchResultItem({this.fullName, this.htmlUrl, this.owner}); | |
static SearchResultItem fromJson(dynamic json) { | |
return SearchResultItem( | |
fullName: json['full_name'] as String, | |
htmlUrl: json['html_url'] as String, | |
owner: GithubUser.fromJson(json['owner']), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment