Skip to content

Commit adaedaf

Browse files
author
Miqueas
committed
Added initial Dart code for the Dart example
1 parent a230b1a commit adaedaf

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Github.dart

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import 'dart:convert';
2+
import 'dart:io';
3+
4+
const BASE_URL = "https://api.github.com/users/";
5+
6+
class GthUserItem {
7+
int count;
8+
var arr = <String>[];
9+
10+
GthUserItem(this.count);
11+
}
12+
13+
class GthUser {
14+
late String _url;
15+
16+
late String name;
17+
late String bio;
18+
late String link;
19+
late GthUserItem repos;
20+
late GthUserItem gists;
21+
late GthUserItem followers;
22+
late GthUserItem following;
23+
24+
GthUser(String username) : this._url = BASE_URL + username;
25+
26+
void init() async {}
27+
}
28+
29+
void main(List<String> args) async {
30+
var user = GthUser(args[0]);
31+
user.init();
32+
print(user._url);
33+
}

0 commit comments

Comments
 (0)