create static method
User
create({
- String special_type = "user",
- int? id,
- String? name,
- String? username,
- String? company,
- String? bio,
- String? type,
- int? followers_count,
- int? following_count,
- String? location,
- String? avatar_url,
- String? html_url,
- bool? site_admin,
- String? blog,
- Object? email,
- Object? hirable,
- int? public_repos,
- int? public_gists,
- int? create_date,
- int? update_date,
- String? twitter_username,
- String? events_url,
- String? followers_url,
- String? following_url,
- String? gists_url,
- String? gravatar_id,
- String? node_id,
- String? organizations_url,
- String? received_events_url,
- String? repos_url,
- Object? starred_at,
- String? starred_url,
- String? subscriptions_url,
- String? url,
- int? total_private_repos,
- int? owned_private_repos,
- int? disk_usage,
- UserPlan? plan,
override
return original data json
Implementation
static User create({
String special_type = "user",
int? id,
String? name,
String? username,
String? company,
String? bio,
String? type,
int? followers_count,
int? following_count,
String? location,
String? avatar_url,
String? html_url,
bool? site_admin,
String? blog,
Object? email,
Object? hirable,
int? public_repos,
int? public_gists,
int? create_date,
int? update_date,
String? twitter_username,
String? events_url,
String? followers_url,
String? following_url,
String? gists_url,
String? gravatar_id,
String? node_id,
String? organizations_url,
String? received_events_url,
String? repos_url,
Object? starred_at,
String? starred_url,
String? subscriptions_url,
String? url,
int? total_private_repos,
int? owned_private_repos,
int? disk_usage,
UserPlan? plan,
}) {
// User user = User({
User user_data_create = User({
"@type": special_type,
"id": id,
"name": name,
"username": username,
"company": company,
"bio": bio,
"type": type,
"followers_count": followers_count,
"following_count": following_count,
"location": location,
"avatar_url": avatar_url,
"html_url": html_url,
"site_admin": site_admin,
"blog": blog,
"email": email,
"hirable": hirable,
"public_repos": public_repos,
"public_gists": public_gists,
"create_date": create_date,
"update_date": update_date,
"twitter_username": twitter_username,
"events_url": events_url,
"followers_url": followers_url,
"following_url": following_url,
"gists_url": gists_url,
"gravatar_id": gravatar_id,
"node_id": node_id,
"organizations_url": organizations_url,
"received_events_url": received_events_url,
"repos_url": repos_url,
"starred_at": starred_at,
"starred_url": starred_url,
"subscriptions_url": subscriptions_url,
"url": url,
"total_private_repos": total_private_repos,
"owned_private_repos": owned_private_repos,
"disk_usage": disk_usage,
"plan": (plan != null) ? plan.toJson() : null,
});
// return user;
return user_data_create;
}