create static method

User create({
  1. String special_type = "user",
  2. int? id,
  3. String? name,
  4. String? username,
  5. String? company,
  6. String? bio,
  7. String? type,
  8. int? followers_count,
  9. int? following_count,
  10. String? location,
  11. String? avatar_url,
  12. String? html_url,
  13. bool? site_admin,
  14. String? blog,
  15. Object? email,
  16. Object? hirable,
  17. int? public_repos,
  18. int? public_gists,
  19. int? create_date,
  20. int? update_date,
  21. String? twitter_username,
  22. String? events_url,
  23. String? followers_url,
  24. String? following_url,
  25. String? gists_url,
  26. String? gravatar_id,
  27. String? node_id,
  28. String? organizations_url,
  29. String? received_events_url,
  30. String? repos_url,
  31. Object? starred_at,
  32. String? starred_url,
  33. String? subscriptions_url,
  34. String? url,
  35. int? total_private_repos,
  36. int? owned_private_repos,
  37. int? disk_usage,
  38. 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;
}