create static method
User
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "user",
- String? id,
- String? first_name,
- String? type,
override
Generated
Implementation
static User create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "user",
String? id,
String? first_name,
String? type,
}) {
// User user = User({
final Map user_data_create_json = {
"@type": special_type,
"id": id,
"first_name": first_name,
"type": type,
};
user_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (user_data_create_json.containsKey(key) == false) {
user_data_create_json[key] = value;
}
});
}
return User(user_data_create_json);
}