create static method

User create({
  1. String special_type = "user",
  2. String? login,
  3. num? id,
  4. String? node_id,
  5. String? avatar_url,
  6. String? gravatar_id,
  7. String? url,
  8. String? html_url,
  9. String? followers_url,
  10. String? following_url,
  11. String? gists_url,
  12. String? starred_url,
  13. String? subscriptions_url,
  14. String? organizations_url,
  15. String? repos_url,
  16. String? events_url,
  17. String? received_events_url,
  18. String? type,
  19. bool? site_admin,
  20. String? name,
  21. String? company,
  22. String? blog,
  23. String? location,
  24. String? email,
  25. bool? hireable,
  26. String? bio,
  27. String? twitter_username,
  28. num? public_repos,
  29. num? public_gists,
  30. num? followers,
  31. num? following,
  32. String? created_at,
  33. String? updated_at,
  34. num? private_gists,
  35. num? total_private_repos,
  36. num? owned_private_repos,
  37. num? disk_usage,
  38. num? collaborators,
  39. bool? two_factor_authentication,
  40. Plan? plan,
  41. num special_status_code = 0,
})
override

return original data json

Implementation

static User create({

  String special_type = "user",
  String? login,
  num? id,
  String? node_id,
  String? avatar_url,
  String? gravatar_id,
  String? url,
  String? html_url,
  String? followers_url,
  String? following_url,
  String? gists_url,
  String? starred_url,
  String? subscriptions_url,
  String? organizations_url,
  String? repos_url,
  String? events_url,
  String? received_events_url,
  String? type,
  bool? site_admin,
  String? name,
  String? company,
  String? blog,
  String? location,
  String? email,
  bool? hireable,
  String? bio,
  String? twitter_username,
  num? public_repos,
  num? public_gists,
  num? followers,
  num? following,
  String? created_at,
  String? updated_at,
  num? private_gists,
  num? total_private_repos,
  num? owned_private_repos,
  num? disk_usage,
  num? collaborators,
  bool? two_factor_authentication,
    Plan? plan,
  num special_status_code = 0,
})  {
  // User user = User({
Map user_data_create_json = {

    "@type": special_type,
    "login": login,
    "id": id,
    "node_id": node_id,
    "avatar_url": avatar_url,
    "gravatar_id": gravatar_id,
    "url": url,
    "html_url": html_url,
    "followers_url": followers_url,
    "following_url": following_url,
    "gists_url": gists_url,
    "starred_url": starred_url,
    "subscriptions_url": subscriptions_url,
    "organizations_url": organizations_url,
    "repos_url": repos_url,
    "events_url": events_url,
    "received_events_url": received_events_url,
    "type": type,
    "site_admin": site_admin,
    "name": name,
    "company": company,
    "blog": blog,
    "location": location,
    "email": email,
    "hireable": hireable,
    "bio": bio,
    "twitter_username": twitter_username,
    "public_repos": public_repos,
    "public_gists": public_gists,
    "followers": followers,
    "following": following,
    "created_at": created_at,
    "updated_at": updated_at,
    "private_gists": private_gists,
    "total_private_repos": total_private_repos,
    "owned_private_repos": owned_private_repos,
    "disk_usage": disk_usage,
    "collaborators": collaborators,
    "two_factor_authentication": two_factor_authentication,
    "plan": (plan != null)?plan.toJson(): null,
    "@status_code": special_status_code,


};


        user_data_create_json.removeWhere((key, value) => value == null);
User user_data_create = User(user_data_create_json);

return user_data_create;



    }