create static method
Sections
create({
- bool schemeUtilsIsSetDefaultData = false,
- String? id,
- String? title,
- num? grantedpoints,
- num? maxpoints,
- String? status,
- String? summary,
- String special_type = "sections",
override
return original data json
Implementation
static Sections create({
bool schemeUtilsIsSetDefaultData = false,
String? id,
String? title,
num? grantedpoints,
num? maxpoints,
String? status,
String? summary,
String special_type = "sections",
}) {
// Sections sections = Sections({
final Map sections_data_create_json = {
"id": id,
"title": title,
"grantedPoints": grantedpoints,
"maxPoints": maxpoints,
"status": status,
"summary": summary,
"@type": special_type,
};
sections_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (sections_data_create_json.containsKey(key) == false) {
sections_data_create_json[key] = value;
}
});
}
return Sections(sections_data_create_json);
}