Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7c8aa39

Browse files
Make user model
1 parent 5956ada commit 7c8aa39

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎lib/Models/User.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class User {
2+
final String login;
3+
final String avatar_url;
4+
final String html_url;
5+
6+
User(this.login, this.avatar_url, this.html_url);
7+
8+
Map toJson() => {
9+
'login': login,
10+
'avatar_url': avatar_url,
11+
'html_url': html_url
12+
};
13+
14+
User.fromJson(Map json) :
15+
login = json['login'],
16+
avatar_url = json['avatar_url'],
17+
html_url = json['html_url'];
18+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /